Friday 15 August 2008, Allan Wind wrote : > On 2008-08-15T08:52:42, hce wrote: > > Does anyone know what is the git update command similar to svn > > update? > > git pull > > > /Allan > -- > Allan Wind > Life Integrity, LLC > http://lifeintegrity.com
I think it would be more something like : git stash && git pull --rebase && git stash apply But you have to be careful with --rebase option. git stash will save the local non commited modifications to be able to make the pull command (svn up can be done wheter or not you have locally modified files). --rebase will allow rearrangement of commit in local history to avoid a merge commit. I remember a situation with 3 computer : - susanoo (the reference git) - olivaw - simplet susanoo was at version A and olivaw and simplet has done commit B and C respectively. I made a git push on simplet, all went well. Then I wanted to make a git pull on olivaw and it did : A -> B -> C-B -> B (merge commit) which was a bit strange. There was one commit with B being undone and being done again. With --rebase it gave : A -> B -> C as expected. But I think you must be careful with --rebase in case of an octopus pull or in case of several pull from different repository. I think you should verify the commit history log (git log) after every git pull --rebase. Regards, Thomas Preud'homme -- Why Debian : http://www.debian.org/intro/why_debian
signature.asc
Description: This is a digitally signed message part.