On Sun, May 11, 2008 at 1:58 PM, Dima Kagan <dima.kagan@gmail.com> wrote:
> >> Basically I see that the same file I edited on the 'test_branch'
> >> branch appears to be modified on the 'master' branch as well. This
> >> behavior is unwanted, of course.
> >>
> >> Can someone please tell me, what am doing wrong? Or is this git's
> >> normal behavior?
> >
> > This is normal, and wanted, behavior.
> >
>
> That's a subjective point of view :) I'm coming from the SVN world
and uncommitted changes on one branch don't affect other branches. Is
there a way I can achieve this behavior with git?
There are several ways, actually.
The one I prefer to use is to commit the modifications. Then, you can
use git-reset HEAD^ to drop that temporary commit when you come back
to this branch, or git-commit --amend to modify it.
Always keep in mind that in git's world, history is not set in stone,
you can always modify previous commits, reorder them or merge them, as
long as you have not pushed them to your public repository (in your
case, the SVN one).