Branches – Using branches in Git to improve workflow



Branches – Using branches in Git to improve workflow

0 0


branches-talk


On Github megahbite / branches-talk

Branches

Using branches in Git to improve workflow

Megan Bowra-Dean / @megahbite Software Developer at Rabid Tech

Git vs Other DVCS

Why do we use Git over Mercurial or Bazzar?

Git is not user friendly

Even by command line tool standards Git fails at consistency

git branch -D <branch_name>
git remote remove <remote_name>

However Git is really awesome and fast for branching code

This is probably Git's main advantage over other DVCSs but it is underutilised. Using Git's powerful and fast branching capabilities we can create robust workflows

What does a robust branch based workflow look like?

The seminal work on this is probably Vincent Driessen's "A successful Git branching model" http://nvie.com/posts/a-successful-git-branching-model/

Over engineered?

This workflow is suitable for large open source projects with many contributors but is probably too complex for a small agile company like Rabid.

How we've adapted this workflow for the project NZ Navigator

  • Kept the core master and develop branches on Bitbucket
  • Create hotfix branches as they're needed.
  • Removed the release branches
  • Feature branches are kept in local repositories only
Diagram

Streamlining the workflow allows us to keep rapid agile development while maintaining structure and accountability.

THE END