Bookmarklet to facilitate generating new git branches for PivotalTracker Stories

This bookmarklet grabs a PivotalTracker story title, transforms it into a valid git branch name and automatically prepends your initials and an optional abbreviation (for better tab completion). It will output the following formats:

If you cancel the first dialog or confirm it without entering text:

git checkout -b kw/178298638-card-320-state-machines

If you enter an abbreviation (e.g. stm in this case):

git checkout -b kw/stm/178298638-card-320-state-machines

How to set it up:

  • in the attached file replace YOUR_INITIALS with your actual initials (e.g. kw) in the first line
  • create a new bookmark and copy the first line into the URL field

The rest of the file is just the same code again with readable formatting.

See also

Klaus Weidinger Over 2 years ago