Git command for deleting local and remote tag

Git tags are used to store a specific version of a file and more globally tag specific commits in the history of a repository. On Github, for example, release are attached to a tag, so a point in the Git commits history.

For some reason, you may want to remove this tag from your local repository and from the remote repository.

Delete a local Git Tag

The local part is pretty simple, you just need to run the following command:

git tag -d <tag>

Delete a remote Git Tag

In order to remove a tag from the remote repository, you need to push the command to the origin. You need to run the following command:

git push --delete origin <tag>

Consulting

If you're seeking solutions to a problem or need expert advice, I'm here to help! Don't hesitate to book a call with me for a consulting session. Let's discuss your situation and find the best solution together.

Share this post
Follow the RSS feed