Git-R-Done

Just a quick followup on the completion of the Bricolage Git migration last week, today I completed writing up a set of GitHub wiki documents explaining to my fellow Bricoleurs how to start hacking. The most important bits are:

  • Working with Git, explaining how to get set up with a forked Bricolage repository
  • Contributing a Bug Fix, an intro to the Git way of doing things (as far as I understand it)
  • Working with Branches, describing how to track a maintenance branch in your fork
  • Merging with Git, to cover the frequent merging from Bricolage maintenance branches into master, and how to get said merges pushed upstream
  • Starting a Project Branch, which you’d need to read if you were taking on a major development task, such as a Summer of Code project
  • Contributing via Email, for those who don’t want a GitHub account (needs fleshing out)
  • Creating a Release, in which the fine art of branching, tagging, and releasing is covered

If you’re familiar with the “Git way,” I would greatly appreciate your feedback on these documents. Corrections and comments would be greatly appreciated.

I also just wanted to say that the process of reconstructing the merge history from CVS and Subversion was quite an eye-opener for me. Not because it was difficult (it was) and required a number of hacks (it did), but because it highlighted just how much better a fit Git is for the way in which we do Open Source software development. Hell, probably closed-source, too, for that matter. I no longer will have to think about what revisions to include in a merge, or create a branch just to “tag” a merge. Hell, I’ll probably be doing merges a hell of a lot more often, just because it’s so easy, the history remains intact, and everything just stays more up-to-date and closely integrated.

But I also really appreciate the project-based emphasis of Git. A Subversion repository, I now realize, is really very much like a versioned file system. That means where things go is completely ad-hoc, or convention-driven at best. And god forbid if you decide to change the convention and move stuff around! It’s just so much more sane to get a project repository, with all of the history, branches, tags, merges, and everything else, all in one package. It’s more portable, it’s a hell of a lot faster (ever tried to check out a Subversion repository with 80 tags?), and just tighter. it encourages modularization, which can only be good. I’ll tell you, I expect to have some frustrations and challenges as I learn more about using Git, but I’m already very much happier with the overall philosophy.

Enough evangelizing. As a last statement on this, I’ve uploaded the Perl scripts I wrote to do this migration, just in case someone else finds them useful:

  • bric_cvs_to_git migrated a CVS backup to Git.
  • bric_to_git migrated Subversion from r5517 to Git.
  • stitch stitched the CVS-migrated Git repository into the Subversion-migrated Git repository for a final product.

It turned out that there were a few files lost in the conversion, which I didn’t notice until after all was said and done, but overall I’m very happy. My thanks again to Ask and the denizens of #git for all the help.

  • E-mail this story to a friend!
  • Sphinn
  • StumbleUpon
  • Facebook
  • del.icio.us
  • LinkedIn
  • TwitThis
  • Digg
  • Google
  • MySpace
  • Reddit
  • StumbleUpon
  • Technorati
  • Yahoo! Buzz

Comments & Trackbacks

Adam Sjøgren wrote:

origin

The only thing I found slightly confusing while reading your nice write-ups (as a beginning-to-intermediate git-user) is that you consistently include "origin" (as in "git pull origin") until you reach the "Starting a Project Branch"-page, where you suddenly go "git pull" without the "origin".

I think it would good to either explain what "git pull" does the first time (defaulting to what you cloned from, I guess), or using "git pull origin" everywhere.

Just a very small nit, the pages explains the workflows very nicely, I think.

Theory wrote:

Re: origin

Thanks for your comments, Adam. As a newbie Git user, I'm not always clear on these things myself. I think that git pull pulls in the changes for origin, by default, and for the current branch by default, but I'm not sure. The documentation doesn't really say, either, that I can see in a quick scan. But it does seem like a plain old git pull does what I want whenever I use it.

So much to learn still…

—Theory

Adam Sjøgren wrote:

Re: origin

It says something under "Default Behaviour" in the documentation, but quite far down the page.

Default is origin, unless on a branch where branch.branchname.remote is present in the configuration, then that is used.

When you clone a repository, you automatically get branch.master.remote set to "origin" in .git/config, which is consistent with the default.

I'm just learning how to use github to interact with another project, and your guide came in quite handy, so thanks!

Discussion is now closed.

Powered by KinoSearch