If you don't commit the changes Git won't do anything to them when you change branches, I.e. they'll still be there but this time on top of master. As you don't want to commit the changes you'll need to "stash" them instead to get to a clean state. A checkout of master should then get what you want.
Take a look at - http://git-scm.com/book/en/Git-Tools-Stashing HTH Alex On Tuesday, 3 September 2013 14:44:34 UTC+1, maya melnick wrote: > > > > > hi, > > I'm just starting out with Git... I have a little issue with branching: > > I'm in branch master; I create a new branch; checkout new branch (called > 'test'); I make changes and save them; I switch back to branch master; but > changes I made in branch 'test' are still there... they do not get > reverted.... > > i.e., following what's here, > http://git-scm.com/book/en/Git-Branching-What-a-Branch-Is > > if you look right underneath figure 3.8, where it says > > That command [git checkout master] did two things. It moved the HEAD >> pointer back to point to the branch, and it reverted the files in your >> working directory back to the snapshot that points to. > > [emphasis mine] > > but in my case when I switch back to branch master the changes I made in > branch 'test' do not get reverted.... I look in the dir and the one file I > added in branch 'test' is still there when I have switched to branch > 'master'... > > (I haven't commited, it's just a test branch, I don't want to > commit....;-) make sense? > (I haven't staged either.....) > > thank you.... > > -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.