Scheme:

{feature,fix,nonfimp}/-/-{explore,proposal}

Example:

fix/gt1648-make-tests-pass-under-karma/1-explore

Advantages:

  • The output of git branch stays neat, even when you work with many branches.
  • It will be easier for you to go back and see everything you explored for a certain ticket.
  • The numbered explore- and proposal-branches allow you to rebase and squash and edit freely while keeping other lines of exploration intact. Without this, you would have to dig through the reflog to undo a botched rebase.
  • As the branch name contains the issue number, it’s easy for your colleagues to find the changes that belong to the in-progress tickets.
  • In general, when you push your feature branches to origin and your colleagues run git fetch origin, your branches show up in their branch autocompletion list. By using a common scheme, the contents of the autocompletion list will be predictable.

Details:

  • ‘nonfimp’ stands for non-functional improvement. If you have a better short word for it, please suggest it in the comments.
  • I suggest that you make the fix/feature/nonfimp prefix mirror the labels you give tickets in your ticket tracker.
  • The ticket reference can be the issue number in Redmine, a board shortcut plus card number in Trello etc.
  • explore is for branches where you’re poking around. proposal is for when you make neat commits that you will git-send or open a pull request for.

I suggest composing this with git retire.