Last active
May 26, 2022 23:19
-
-
Save RandomArray/fdaa427878952d9768b0 to your computer and use it in GitHub Desktop.
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Remove All Git Tags with the Windows Command Line
Windows CLI commands to delete all GIt Tags and then remove the tags from origin. Use at your own risk.
These first few commands will stop Git from asking for your password to origin throughout the loop.
Replace with your own usename and email:
These next two commands tell Git to use your Windows credentials to store your origin password.
Git Tag Destruction:
This deletes all Local Tags by running
git tagand feeding that list togit tag -d.This deletes all Remote/Origin Tags from the list output by "git tag -l".
I had to run the 1st command a second time for
git tagto not list tags anymore.I am just learning Git and I cloned a some random
jquery-upload-???project. I noticed all of the other project's commit logs showing up in the project I was working on. I could not find a way inside of Git Gui or SourceTree to remove the other Repo/Project/?? from my project. None of the files existed, and the other project wasn't listed anywhere. Just the commits were showing up. I see how this could be a good thing once I figure it out. The commands above were the only way I could quickly clean up the mess I made for myself.When I ran the Linux commands from Git Bash on Windows, they did not work. I got the following errors:
More searching led me to discover that since I was on Windows, I needed to do the same thing
xargswas doing, but with a Windows command. I've included the links where I found some information that helped me get to this point.http://stackoverflow.com/questions/19542301/delete-all-tags-from-a-git-repository/19542426#19542426
http://superuser.com/questions/276373/is-it-possible-to-pipe-a-list-of-files-to-rmdir-on-windows