http://showterm.io/c87a5df3ed8799444aef1#fast
- ruby 1.9.3+
- pivotal-tracker gem
- git
gem i pivotal-tracker
- Copy
bin/git-pivotal
andbin/git-start
somewhere in your PATH. - Copy
hooks/prepare-commit-msg
into your repositories hooks directory,.git/hooks
.
-
Set your API token in your
~/.gitconfig
git config --global pivotal.api-token YOUR_API_TOKEN
-
Set your project id in your repository
git config pivotal.project-id PROJECT_ID
git-pivotal is based around assigning an story id to a branch. This is managed
by the git config setting branch.<NAME>.pivotal-story-id
.
git-pivotal
supports listing and changing states of pivotal tracker stories
based on the current branch. It allows listing stories and changing their
states.
usage: git pivotal ls # list all available stories
or: git pivotal list # list all available stories (full format)
or: git pivotal set-story ID # set the story tracked by this branch
or: git pivotal set-project ID # set the project tracked by this repository
or: git pivotal show # show the story tracked by this branch
or: git pivotal [start|restart|finish|deliver]
# set the state of the current story
This belongs in your repository's hooks directory, .git/hooks
. It fills in
your commit message with the story id for the current branch.
git-start is a small script which shows one option for using git-pivotal in your workflow. If you work differently, it's easy to replace.
usage: git start STORY_ID NEW_BRANCH
git start
creates a new branch and sets its pivotal tracker story id.
In addition to the git start
command, you may want aliases to make using
git-pivotal more natural. The following is from my ~/.gitconfig
[alias]
i = pivotal ls
story = pivotal show
stories = pivotal list
restart = pivotal restart
finish = pivotal finish
deliver = pivotal deliver