I haven’t really had the chance to work with Git much over the years, other than creating a GitHub account and performing some simple merges on my own projects. For work reasons, however, I’ve been looking into sustainable models for using Git as an enterprise source control for larger, long-running projects.
My investigations started with the following branching strategy: http://nvie.com/posts/a-successful-git-branching-model/
This strategy is very similar to many I’ve used for other source control types, and I believe it is a good transition strategy for folks like myself who are moving from a centralized to a distributed version control system and want to have something familiar to them that supports all their normal branching needs.
I think the real key here is the separation of streams for release and development. Hotfixes are rarely used, and long-standing feature branches seldom happen in my past experience, but keeping new development separate from released code (and separate from bug fixes on released code) is of paramount importance.
A Simpler Model
There is another strategy that simplifies this model by removing the hotfixes lane and having the origin/master branch represent what is in production. It also moves to a single release branch model for what is currently in the staging environment in order to reduce the number of release branches and eliminate the need to update : http://drewfradette.ca/a-simpler-successful-git-branching-model/.
While I like some of the simplifications, this model removes the ability to work on multiple releases at once. For example, if you have a QA environment and a pre-production staging environment, you could potentially have two releases going through testing for promotion to production; a single release branch would not support this.
For my own needs, perhaps something between these two models will fit what I need, so that I can have the multiple release support but still maintain some simplicity and reduce numbers of branches created.
If you have your own branching strategy suggestions, let me know what has worked for you!