Skip to content

Instantly share code, notes, and snippets.

@ShinChven
Last active July 22, 2021 02:19
Show Gist options
  • Save ShinChven/2f85f51d1840a3c958ec3062b3036122 to your computer and use it in GitHub Desktop.
Save ShinChven/2f85f51d1840a3c958ec3062b3036122 to your computer and use it in GitHub Desktop.
git short cut
#!/bin/bash
## make a git tag, and push to origin remote
git tag -d $1 || true
git tag $1
echo "Push tag to origin remote?"
select yn in "Yes" "Force" "No"; do
case $yn in
Yes ) git push origin $1; break;;
Force ) git push --force origin $1; break;;
No ) exit;;
esac
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment