Skip to content

Instantly share code, notes, and snippets.

@jguadagno
Created March 9, 2020 16:33
Show Gist options
  • Save jguadagno/e9a8da6401ab472f217bcc7b9f1a316e to your computer and use it in GitHub Desktop.
Save jguadagno/e9a8da6401ab472f217bcc7b9f1a316e to your computer and use it in GitHub Desktop.
ZSH Script for git staging, committing, pushing, and tagging. Used for Presentations
#!/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