Remove all git tags expect a custom list of git tags?
Im trying to write a bash script that asks you for how many tags you want to keep and afterwards you can enter the tags you want to keep. Next the script should remove all remote git tags expect the ones entered before. But how can I achieve this? Thanks in advance
You can use git tag
to retrieve all tags in a repository
Then you will have to loop over these tags and if it does not match any of the given tags, remove it using the following git command :
git push --delete origin tagname
链接地址: http://www.djcxy.com/p/49300.html
上一篇: 在git中,合并有什么区别