Created
February 19, 2014 21:45
-
-
Save dcadenas/9102336 to your computer and use it in GitHub Desktop.
Git + pivotal tooling
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/env bash | |
# ~/bin/githelpers | |
pivotal_commit() { | |
git commit -m "$@ [#$GIT_PIVOTAL_NUM]" | |
} | |
pivotal_commit_and_finish() { | |
git commit -m "$@ [Finishes #$GIT_PIVOTAL_NUM]" | |
} | |
pivotal_commit_and_fix() { | |
git commit -m "$@ [Fix #$GIT_PIVOTAL_NUM]" | |
} | |
pivotal_commit_open() { | |
pivnum=`git log $1 -n1 --oneline --pretty=%s | sed -e 's/^.*\[#\(.*\)\].*$/\1/'` | |
open https://www.pivotaltracker.com/s/projects/926538/stories/$pivnum | |
} | |
--------------------------------------------------------------------------- | |
#.gitconfig | |
commitpivotal = "!. ~/bin/githelpers && pivotal_commit" | |
commitpivotalfinish = "!. ~/bin/githelpers && pivotal_commit_and_finish" | |
commitpivotalfix = "!. ~/bin/githelpers && pivotal_commit_and_fix" | |
showstory = "!. ~/bin/githelpers && pivotal_commit_open" | |
----------------------------------------------------------------- | |
# .bashrc or .zshrc | |
setpivotalnum() { export GIT_PIVOTAL_NUM=$1 } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment