Our Git Workflow: Private Development, Public Releases
braintreepaymentsolutions.com
braintreepaymentsolutions.com
However, our workflow became much too convoluted and we switched to gitflow by Vincent Driessen (nvie.com). In fact, there are similarities between gitflow and the braintree workflow but gitflow now has as a git "flow" module to help you out.
If you haven't checked out gitflow, I highly recommend it. Here's the original post that started it all: http://nvie.com/git-model
Has anyone else found git workflows that work well for them?
It also amazes me that they consider branches to be cluttering.
I was thinking about your comment about seeing the progress of the project. While that is conventional for open source projects, it is unconventional for products. And since our client libraries are tied so closely to our product, progress of libraries is progress of our product. Anybody have thoughts/experiences/etc on sharing day-to-day development of their products? I know some companies do it, but it doesn't seem very common.
A general rule of thumb is only to create a branch when you need to work in parallel: code needs to be separated to allow for simultaneous updates or if a feature needs to be isolated until it's release timetable is set. This will vary depending on team size, work patterns and the nature of code changes.
Instead, each developer should handle this on their own: commit often, once they're happy with their progress, theh rebase -i, squash and reorder their commits to make them look nice and push that tidy commit to master or release.
This gives you the best of both worlds: an accurate version of your history that doesn't contain throwaway or half baked commits.
Good, logically separate changesets make merging, backporting (cherry-picking), bisecting and reverting much easier. It is worth the trouble.
The version history of the git project itself serves as a magnificent example of what a commit history should look like. It's actually possible to read the logs and understand each committed change. (Most of the time)
We use topic branches a lot in our startup and we find them convenient, useful and efficient. I would never consider doing what they do.
Then again, to each his workflow, I guess.
In svn it applies specified changes to your working copy, while in git it either fast-fowards branch-a to branch-b if applicable, or finds a common ancestor for the commits and creates a 'merge commit' so the commit history won't be linear (it will branch and re-converge). If all the branches are local, you can also use 'rebase' and that will make the history a little cleaner (well, linear at least).
The chapter on branches in the pro git book is enlightening: