Tag Archives: tags

Git: Deleting branches and tags

Deleting local branch

git branch -d branchName

Deleting remote branch

git push origin :branchName

Deleting local tag

git tag -d tagName

Deleting remote tag

git push origin :refs/tags/tagName

Pushing tags into a Git repository

To push a tag into a Git repository, you need to execute the following command:

git push --tags

The usual git push –all does not push the tags.

This is quite a handy tip, especially when you just have a tag to be pushed to the repository and do not have any other local modifications.