2009/3/27 James Byrne <[email protected]> > > Colin Law wrote: > > > There are a number of good git tutorials on the web, google will find > > them. Perhaps looking at some of those would help to get the concepts > sorted. > > It all seems a bit complex at first but once you have played with it for > a > > while you will wonder how life managed without it. > > As I wrote, I have been using git for about a year now. I converted all > our projects from Subversion last spring. And I have done quite a few > tutorials. I have no trouble in using git, I just now desire to see how > branch and merge works, without following a script so to speak. > > > When you switch branches git overwrites them with the version > > from the repository for that branch, unless they have been > > modified but not committed, in which case it does not overwrite > > them. The git repository contains all the versions of all the files > > on all the branches and when you checkout it copies the appropriate > > versions into your local folders (but not overwriting modified files > > as we have seen). A commit copies files that you have modified and > > marked for commit into the repository (on the appropriate branch). > > However, in addition to the forgoing, when I switched from a branch with > modified files into the master branch then git copied the modified files > into the master branch as well.
It is not copying the modified files anywhere, they are staying exactly where they are, the working copy is always in the same place (unless you move the whole tree of folders of course). > This put the master branch into a state > as if I had edited those files in that branch. It was this behaviour > that confused me. I thought that whatever one did in a branch stayed in > that branch and did not follow one around modifying every other branch > that one enters. Again, the branch is not being modified, a branch is only modified when a commit or similar is performed. It is the working copy that you are talking about. > > > How does one check for commits, and their contents, made to other > branches but not yet merged back into the master? I Use gitk > > -- > 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 -~----------~----~----~----~------~----~------~--~---

