Created
April 21, 2014 18:17
-
-
Save fieldform/11151361 to your computer and use it in GitHub Desktop.
tagging a git branch
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
# git-tag.sh | |
tag=$(git symbolic-ref HEAD 2>/dev/null | cut -d"/" -f 3) | |
tag+="_" | |
tag+=$(date +"%Y%m%d") | |
read -p "What's the tag count for today? " n | |
tag+=$n | |
git tag "$tag" | |
while true; do | |
read -p "Push tag? " yn | |
case $yn in | |
[Yy]* ) git push --tags; break;; | |
[Nn]* ) break;; | |
* ) echo "Please answer yes or no.";; | |
esac | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment