You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
Git Tag Destruction:
This 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.
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:
X:\user1>git tag | xargs git tag -d
xargs: cannot fork: Permission denied
X:\user1>git tag -l | xargs git tag -d
xargs: cannot fork: Permission denied
X:\user1>git tag -l | xargs -n 1 git tag -d
xargs: cannot fork: Permission denied
More searching led me to discover that since I was on Windows, I needed to do the same thing xargs was doing, but with a Windows command. I've included the links where I found some information that helped me get to this point.
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 tag
and 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 tag
to 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
xargs
was 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