Re: newbie question
- From
dloewenherz@gmail.com <dloewenherz@gmail.com>
- Date
- Jul 3, 2009, 19:12 UTC
- Message-ID
- <20090703191230.GA2446@andros>
- In-Reply-To
- <e4a904790907031139rc61c2e0t6b9dbbc0c3dc379e@mail.gmail.com>
Until you commit the files, the changes will follow you to whatever branch you go to. If you don't want to commit, but still want to switch to B and not see the changes in A, I would recommend using `git stash`.
e.g.
git checkout A ...edit... git stash save changes git checkout B git status
You'll see that your tree is clean. To get your changes back to A, just run
git checkout A git stash pop changes
Best, Dan
On 03/07/09 11:39 -0700, Alex K wrote:
Show 16 quoted lines
>Hello, > >I would think the following simple pattern would be possible: > >Create two branches A and B. Switch to A, modify some files, do not >commit to A, switch to B. Now B should not show any of the changes >performed to A? However a git status while on B does show that the >files on A have been modified. Is there something I am missing? > >Thank you, > >Alex >-- >To unsubscribe from this list: send the line "unsubscribe git" in >the body of a message to majordomo@vger.kernel.org >More majordomo info at http://vger.kernel.org/majordomo-info.html