Eric is using Posterous to post everything online. Shouldn't you?
Elstudio-avatar_thumb
Eric Johnson
owns this site
60
subscribers
 
 

Code, Camera, Action

Stories, software and strategies to help nonprofits do the social web

  • About
  • Blog
  • Work
  • Code
  • Camera
  • Action
  • GitHub Best Practices

    The folks at GitHub have taken the pain out of centralized Git hosting. Even better, they’ve built in tools that make distributed version control easy to use for group projects. But how to set up your repositories and branches to avoid merge pain? Here are two good options.

    Making Merge Manageable

    Setting up your Git repositories for open source projects at github has great tips for getting started — and for structuring your branches for group work. There are a couple of take-aways here:

    1. Encourage contributors to track established branch names, like “master” and “edge”. At the office we use “master”, “staging” and “dev”.
    2. This makes it much easier for developers to pull in changes from the official repository in a simple, fast-forward way
    3. Develop on a separate branch (or branches). You might want to name that branch with your github id, to help folks keep it straight.

    Michael also provides a solid how-to, so if “pull request” sounds weird to you, start here.

    Another Way: Branch away and let github-gem straighten it out

    The folks at GitHub have a Ruby command-line tool to manage this without the fancy branch naming conventions. You fork, and the tool helps keep everybody’s master branches separate. It also speeds merging from these masters.

    See defunkt’s Github-gem for the code and a README that explains the tool’s awesomeness.

    Github-gem assumes that master is where you’ll want to pull from. This matches what most folks do — unless they’ve benefited from the foresight of the Inoshi folks.

    Whichever strategy you choose, Github’s network diagram is your visual to-do list. It shows who committed stuff that’s different than what’s on your branch. Say hello to the Network graph visualizer has the details.

    Tags » code git how to
    • 29 October 2008
    • 450 Views
    • Permalink
    • Favorited 0 Times
    • Loading Retweet

    Comments 0 Comments

    Leave a Comment

     
    Got an account with one of these? Login here, or just enter your comment below.
    Posterous-login    Connect    twitter



     
    Loading...
  • Eric Johnson's Posterous

    Startup thinking for the social sector. Code to help nonprofits do the social web. Plus photography.
    (And reading aloud.)

    More about Eric Johnson.

  • About Eric Johnson

    Startup thinking for the social sector. Code to help nonprofits do the social web. Plus photography.
    (And reading aloud.)

    More about Eric Johnson.

  • Subscribe

    Subscribe to this posterous
    Follow this posterous RSS
  • Follow Me

                   

Theme created for Posterous by Obox