git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: You have local changes; cannot switch branches error question

From
Matthieu Moy <matthieu.moy@grenoble-inp.fr>
Date
Dec 25, 2009, 14:32 UTC
Message-ID
<vpqpr63cefw.fsf@bauges.imag.fr>
In-Reply-To
<7vhbrghrsn.fsf@alter.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> writes:
> There are two ways to deal with this situation, one safely, and another
> quickly.

And a third one : commit, and then rebase onto the other branch. It's safe, and nice when your local changes are ready to commit (then, you can write the commit message before bothering about potential merge conflicts).

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
Previous: Junio C Hamano
Message 4 of 4 in “You have local changes; cannot switch branches error question”
  1. Eugene SajineDec 24, 2009
  2. Nanako ShiraishiDec 24, 2009
  3. Junio C HamanoDec 24, 2009
  4. Matthieu MoyDec 25, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.