Last active
June 21, 2017 12:58
-
-
Save AAber/c9deaaed0e778b65af548eb126fc4fa4 to your computer and use it in GitHub Desktop.
.bashrc function to push git commit (instead of 5 commands use 1 command)
This file contains hidden or 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
gpfunction() { | |
git status | |
echo [Enter to continue...] | |
read a | |
git pull | |
git commit -am"$1" | |
git push | |
LATEST_TAG_NUMBER=`git tag |sort -n|tail -1` | |
NEW_TAG_NUMBER=`echo $LATEST_TAG_NUMBER + 1|bc` | |
git tag $NEW_TAG_NUMBER | |
git push origin $NEW_TAG_NUMBER | |
} | |
alias gp=gpfunction |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment