Skip to content

Instantly share code, notes, and snippets.

View willemvd's full-sized avatar

Willem van Dreumel willemvd

  • The Netherlands
View GitHub Profile
@willemvd
willemvd / git-tag-delete-local-and-remote.sh
Created February 21, 2019 09:43 — forked from mobilemind/git-tag-delete-local-and-remote.sh
how to delete a git tag locally and remote
# delete local tag '12345'
git tag -d 12345
# delete remote tag '12345' (eg, GitHub version too)
git push origin :refs/tags/12345
# alternative approach
git push --delete origin tagName
git tag -d tagName
@willemvd
willemvd / gist:a2e19de1baeeb9b7116360330a879922
Created January 23, 2019 13:14
delete branches where remote branch has been deleted (keeps branches which only exists locally)
git fetch -p && for branch in `git branch -vv | grep ': gone]' | awk '{print $1}'`; do git branch -D $branch; done