2009/3/27 James Byrne <[email protected]> > > Please bear with me as I walk through this: > > I start with a pull from the remote. I then create and checkout a > branch, say localtests. I modify a file X.rb on localtests. If I > switch back to the master via git checkout then the change to x.rb comes > with me into the master branch?
It is not 'in' the master branch as it has not been committed, it is just in your working copy, which is the master branch plus your modified file. If you want to get rid of modified files (so your working copy is the same as the current branch or master) you can use: git checkout . Note the dot on the end. Be careful though, this will destroy any uncommitted changes, do not get into the habit of doing it lightly or you will regret it at some point. > However, if I first commit the change > to x.rb on localtests then it does not? If you commit it on the branch and switch to the master then the modified file is in the branch but the original is still in the master. You get back to the modified files by checking out the branch again. > > -- > Posted via http://www.ruby-forum.com/. > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---

