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:
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: