Created
July 23, 2014 05:54
-
-
Save jasonm23/40a9f68278882ee0cb24 to your computer and use it in GitHub Desktop.
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
# Show the current working branch... | |
gwb(){ | |
git branch |\ | |
sed -n '/\* /s///p' | |
} | |
# Show the current working branch stripped of pivitol id, and spaced | |
# (instead of dashed) | |
gwbstrip(){ | |
git branch |\ | |
sed -n '/\* /s///p' |\ | |
sed 's/-/ /g' |\ | |
sed 's/[0-9]*$//' | |
} | |
# Pivotal id scraped from current branch name | |
gpivid(){ | |
git branch |\ | |
sed -n 's/^\* .*-\([0-9]*\)$/\1/p' | |
} | |
# Git commit with message inline, no quotes required. | |
gcmq(){ | |
out="" | |
for a in "$@" | |
do | |
out="$out $a" | |
done | |
git commit -m "$out" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment