Peter Bell, a GitHub trainer and author of Getting Started With GitHub and Git Distilled gives some recommendations on how to use it more effectively.
Git doesn’t tell you how to manage your workflow, so you really have to think about what’s right for your team.
A few general recommendations:
1. Don’t use Gitflow – it’s too complex.
2. Have a master branch that is always releasable.
3. If a feature will take more than half a day, slice it down into smaller stories which you deploy back to master, so you don’t have long-running feature branches.
4. Commit every 5-10 minutes and merge that back into master or do an interactive rebase – take 20 commits and squash them into one e.g. “built new shopping cart feature.”
5. Rebase off of master, rather than merging with master – it gives you a more linear path to look at.
If anyone on the team is unhappy with the given approach, discuss after a few weeks, but don’t waste too much time on workflow strategies when you have something to build.
Peter Bell’s new book on Git stands out from the rest in that it shows you, step-by-step, how to solve a specific problem in 30 minutes or less.