Today I learned about git flow.

It's a little utility that sits on top of git and makes my development flow much easier.

It will also make you forget git pull --rebase and git merge --squash branch immediately, because you won't need it again... maybe...

Oh and it has a VS Code extension!

Git flow in VS Code

How Git Flow works

Basically, the idea is that you have your main branch with the release, develop for staging and all other branches have a "prefix" to make clear what they're for these:

  • Features
  • Bugfixes
  • Support
  • Releases

Then git flow enables easy rebasing in your feature branches while your developing. You can do mediocre git commits, as we do, and fix those nasty typos. And when the feature is ready, we can just squash those commits into a single big commit with the history preserved.

If you're developing the feature together, you can publish the feature and collaborate as per usual with git. Git flow just makes sure you get all the latest changes from both develop and the feature branch.

When you're done, git flow helps you merge the feature and tidy up any remnant branches.

Git Kraken Gitflow image Source: Git Kraken

Just incredibly convenient, especially when working together on a software project.

Get it on Github