Created
March 9, 2020 16:33
-
-
Save jguadagno/e9a8da6401ab472f217bcc7b9f1a316e to your computer and use it in GitHub Desktop.
ZSH Script for git staging, committing, pushing, and tagging. Used for Presentations
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/zsh | |
commitMessage=$1 | |
commitTag=$2 | |
#echo $commitMessage | |
#echo $commitTag | |
if [ -z "$commitMessage" ]; then | |
echo "syntax: gittag 'message'" | |
exit; | |
fi | |
if [ -z "$commitTag" ]; then | |
$commitTag=$commitMessage | |
fi | |
git add . | |
git commit -m $commitMessage | |
git push origin master | |
git tag $commitTag |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment