How to push git tag to remote (With Example)

Once you can create a git tag on your local, it's time to push it to remove so that it can be deployed for the project release.

This blog post will guide you on how to push git tag to the remote.

Git push tag to remote

Pushing a tag in git to a remote is similar to pushing a branch to a git remote. The only difference is that you need to mention the tag name after the "git push" command as by default this command only pushed the branch.

$ git push origin v1.0                                                                                                                                              
Counting objects: 247, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (167/167), done.
Writing objects: 100% (247/247), 333.76 KiB | 27.81 MiB/s, done.
Total 247 (delta 75), reused 245 (delta 74)
remote: Resolving deltas: 100% (75/75), completed with 2 local objects.
To github.com:gulabbisht/drupixels.git
 * [new tag]               v1.0 -> v1.0

Push all git tags to remote

And if you want to push all tags from your local to the remote then add "--tags" to the git command and it will push all tags to the remote.

git push origin --tags

 

Here are some references to detailed documentation around Git Tagging:

You can read further about git tags in the following articles:

Books to buy on Amazon:

Tags