

Ask HN: best practices to branching model (git) - matysanchez

Hello Hackers,<p>I am working on my own project. I am the only developer, but we hope to grow some day, so I want to have everything organized for the future developer.<p>What do you think are the best practices to branching a repo on Git?
======
EnderMB
For me, the best branching model is one that works well for you.

In my mind, version control tools like git and Mercurial are super flexible by
their nature. As a result, looking for the "one true model" is a fruitless
endeavour. It's almost a personal preference, based on how you like to work,
and what you want to do with your project.

I've tried git-flow, and while I liked it many others haven't. It's similar to
how I naturally work, but I can see why others feel that it is overkill.

If your stuff is in version control in the first place then it is unlikely
that your source control methodology is going to vastly affect the project,
and how things might move forward. History is good, but the joys of source
control is that it doesn't dictate how you move on in the future.

My recommendation is to read up on every source control workflow you see here,
give them a try on some personal projects, and then pick what you like the
most and go with it. They all have their good points, and by playing with them
you'll see what works well and what isn't needed for you.

------
dgoujard
One common best practice is [http://nvie.com/posts/a-successful-git-branching-
model/](http://nvie.com/posts/a-successful-git-branching-model/) You can use
[http://danielkummer.github.io/git-flow-
cheatsheet/](http://danielkummer.github.io/git-flow-cheatsheet/) also to help
branch handling.

------
ajtaylor
There was also this workflow [1] posted recently, which is what I'm basically
doing at $work. It's simpler than gitflow, so the reduced overhead might suit
you better as a sole developer.

[1] [http://blogs.atlassian.com/2014/01/simple-git-workflow-
simpl...](http://blogs.atlassian.com/2014/01/simple-git-workflow-simple/)

