Improve your Github + Pivotal workflow with git_tracker


Pivotal Tracker has a cool feature where it adds your git commit messages related to your story as comments. If the commit message contains a corresponding story number, that commit will show up as a comment.

This is the format of the commit message. Notice that the ticket number is inside the brackets with a hashtag.


$ git commit -m "My awesome commit. [#39731421]"

Usually when you work on a story, it will be on a separate branch with a ticket number in the name of the branch. Something like:


feature/39731421_make_it_more_awesome

When you are working on a feature with multiple commits, it becomes redundant to enter the same ticket number in your commit every time. This is where git_tracker can help you out.

git_tracker is a tool that will look at your branch and automatically insert the ticket number in the format specified above.

Installation is quite simple. Follow these steps.

$ cd my_project
$ brew install git-tracker
$ git tracker init

That is it! The tracker will install git commit hooks that will do the magic and add the number to your commit message.

Lastly, if you are not sure how to name your branch here is a list of supported branch formats by git_tracker listed below:

  • best_feature_ever_#8675309
  • best-feature-ever-8675309
  • 8675309_best_feature_ever
  • #8675309-best-feature-ever
  • your_name/8675309_best_feature_ever
  • your_name/#8675309_best_feature_ever