Hacking Startups

Feb 4 2009

Local development branches in Git are a bad idea

Git makes it possible for a programmer to do most work on a branch that’s not pushed to any repository coworkers see.  This is a bad idea.  The only justification I’ve seen was that the practice “let[s] you do some bonehead moves without your co-workers ever having to know”.

You should not need to hide your code from your coworkers.  Even your experimental code.

Local development branches conceal information about the history of the codebase.  The purpose of version control is to preserve this information.  Using a local branch defeats part of the purpose of version control.

If you’re going to make boneheaded moves that break stuff temporarily, making a branch makes total sense.  Just push it out where it’ll be preserved and visible.