Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[linuxtools-dev] git pull/merge vs. fetch/rebase

Hi,

With all the merge commits, our git history is starting to resemble
spaghetti (though not as bad as some [1]).  I'd like to follow the path
that the CDT will likely take [0] and request that people fetch+rebase
rather than just pull (merge).  This will give essentially the same
behaviour as having to 'cvs update' before 'cvs commit' (for those of
you who know CVS :).

When new branches are created, please use the "Rebase" pull strategy
[2].  Please also update your checkouts to use the rebase strategy
(again, see the excellent EGit user guide at [2]).  This is similar to
the commandline:

  git config branch.<branchname>.rebase true

or, for all branches on all repos you have cloned:

  git config --global branch.autosetuprebase always

After setting this, pulling using either EGit or the command line will
first rewind your commits to replay them on top of what has been added
to the remote repository since you last merged.  If there are any
conflicts, you'll have to manually resolve them but that's always true.

Please also try to rebase any feature branches onto the latest master
fairly often.  All of this will hopefully lead to a more linear history
and will clear up the confusion around automatic merge commits.  As we
get more experienced with git, we can do things in a more distributed
and git-y way.  

Thanks,

Andrew

[0]
http://dev.eclipse.org/mhonarc/lists/cdt-dev/msg21878.html

[1]
http://4.bp.blogspot.com/_jUrEaqvFttU/TKcCHi-QXHI/AAAAAAAAA8M/OY8Shjfl23s/s1600/bikesoup-history.png

[2]
http://wiki.eclipse.org/EGit/User_Guide#Branch_Creation_Dialog


Back to the top