Skip to content

Instantly share code, notes, and snippets.

@erica
Created June 11, 2020 23:20
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save erica/1e6a0b2e427cd7d5718d2f6a8f9cb0d5 to your computer and use it in GitHub Desktop.
Save erica/1e6a0b2e427cd7d5718d2f6a8f9cb0d5 to your computer and use it in GitHub Desktop.
####
# Retag
retag = "!f(){ name=`git tag`; git tag -d \"$name\"; echo "Retagged $name"; remote=`git remote -v`; \
if [ \"$remote\" != \"\" ]; then git push origin --delete \"$name\"; fi; \
git tag \"$name\"; \
if [ \"$remote\" != \"\" ]; then git push --tags; else echo "No remote"; fi; };f"
untag = "!f(){ name=`git tag`; git tag -d \"$name\"; remote=`git remote -v`; \
if [ \"$remote\" != \"\" ]; then git push origin --delete \"$name\"; \
else echo "No remote"; fi; };f"
tagit = "!f(){ git tag \"$@\"; echo "Tagged $name"; remote=`git remote -v`; \
if [ \"$remote\" != \"\" ]; then git push --tags; else echo "No remote"; fi; };f"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment