Skip to content

Instantly share code, notes, and snippets.

@Tirael
Forked from RandomArray/RemoveGitTags.txt
Created May 26, 2022 23:19
Show Gist options
  • Save Tirael/78d7dac57ec8021c57ea875aea261c9a to your computer and use it in GitHub Desktop.
Save Tirael/78d7dac57ec8021c57ea875aea261c9a to your computer and use it in GitHub Desktop.
Replace with your own usename and email:
------------------------------------------------
git config --global user.name "Username"
git config --global user.email "[email protected]"
These next two commands tell Git to use your Windows credentials to store your origin password.
------------------------------------------------
git config --global credential.helper wincred
git config --global credential.helper store
Deletes all Local Tags by running "git tag" and feeding that list to "git tag -d".
------------------------------------------------
FOR /f "tokens=*" %a in ('git tag') DO git tag -d %a
This deletes all Remote/Origin Tags from the list output by "git tag -l".
------------------------------------------------
FOR /f "tokens=*" %a in ('git tag -l') DO git push --delete origin %a
I had to run the 1st command a second time for "git tag" to not list tags anymore.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment