How to delete a tag from Git remote repository?


There could be some situation when you tagged your code in local Git repository and pushed it to remote and later you decided to delete the tag. This is simple to delete the tag reference from local, but how to perform the same in remote?

 

Today we are going to see the bash command(s) by which you will be able to remove the tag information from Git. Let's see, how!

 

How to delete a tag from Git remote repository? (www.kunal-chowdhury.com)

 

Tag assigns a meaningful name with a specific version in the repository. Tags are very similar to branches, but the difference is that tags are immutable. You can create a tag on a commit by using the '$ git tag' command. Usually, developers create tags for product releases.

 

To delete a local tag, enter either of the following commands in Git Bash:

$ git tag --delete tagName

$ git tag -d tagName

 

To delete a remote tag, enter either of the following commands in Git Bash:

$ git push origin :tagName

$ git push --delete origin tagName

 

That's all. I hope you liked the tips shared above. In case, you missed my other posts on 'Git Tutorial', do visit at http://git.kunal-chowdhury.com. Don't forget to share the posts in your social channel. Click the social sharing buttons and share your love.

 

 

 


If you have come this far, it means that you liked what you are reading. Why not reach little more and connect with me directly on Twitter, Facebook, Google+ and LinkedIn. I would love to hear your thoughts and opinions on my articles directly. Also, don't forget to share your views and/or feedback in the comment section below.

0 comments

 
© 2008-2017 Kunal-Chowdhury.com - Microsoft Technology Blog for developers and consumers | Designed by Kunal Chowdhury
Back to top