Skip to content

Instantly share code, notes, and snippets.

@AAber
Last active June 21, 2017 12:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AAber/c9deaaed0e778b65af548eb126fc4fa4 to your computer and use it in GitHub Desktop.
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)
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