Digital Marketing

Push Git Tag to Remote

The git tag command creates a local tag with the current state of the branch. When pushing to a remote repository, tags are NOT included by default. It is required to explicitly define that the tags should be pushed to remote.

Push all tags to remote:

$ git push origin --tags
Push a single tag to remote:

$ git push origin <tag_name>

Git 2.4 has added the push.followTags option to turn that flag on by default which you can set with:

git config --global push.followTags true
or by adding followTags = true to the [push] section of your ~/.gitconfig file.

Only push annotated tags to the remote, and keep lightweight tags for local development to avoid tag clashes.


Popular posts from this blog

Make online money from the Internet