Freeman, Douglas Stuart

Default profile image
Freeman, Stuart

Codito ergo sum.

How I track the maintenance branch in git

Dec 23, 2008 10:35 AM Publicly Viewable

There's been a lot of interest in git recently, so I thought I'd share how we're using it to keep up with the maintenance branch.  Our "central git server" keeps a set of branches with the prefix "remote-" that comes from svn, and is updated nightly.  We then have a tsquare-2.5.x branch that we tag and build from that's based on remote-sakai-2.5.x.  So when I'm ready to catch a submodule up to the latest 2.5.x, I just cd into its directory and 'git merge remote-sakai-2.5.x'.  This is interesting because it keeps the order that we commit our local changes and merge the upstream fixes.  I've thought about other ways of doing this like making a new branch from the current tsquare branch and rebasing it to remote-sakai-2.5.x as that would keep our local changes stacked on the end, and would probably make it easier to do larger changes like switching to 2.6.x.  Stgit appears to do something similar and may even fit our model better, but I haven't had a lot of time to investigate it yet.