Skip to content

Instantly share code, notes, and snippets.

@dearaujoj
dearaujoj / delete-local-and-remote-tags
Created November 17, 2014 13:33
delete local and remote Git tags programatically
#check tag with specific value
for i in 2013 ; do git tag -l | grep "$i" ; git ls-remote --tags origin | awk '{print ":"$2}' | grep "$i" | grep -v '{}' ; done
#delete local and remote tag with specific value
for i in 2013 ; do git tag -l | grep "$i" | xargs git tag -d ; git ls-remote --tags origin | awk '{print ":"$2}' | grep "$i" | grep -v '{}' | xargs git push origin ; done
#credits http://anavarre.net/2014/01/07/delete-local-and-remote-git-tags-programatically
sshfs username@hostname:/remote/directory/path /local/mount/point -ovolname=NAME