Bookmarklet to facilitate generating new git branches for PivotalTracker Stories

Posted Over 2 years ago. Visible to the public.

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
Last edit
Over 2 years ago
Henning Koch
Attachments
License
Source code in this card is licensed under the MIT License.
Posted by Klaus Weidinger to makandra dev (2021-08-25 14:30)