Git push tag to remote repository

3 points
Asked by:

How can I push tag created locally to remote repository?

What is the easiest way of doing that?

Commands I executed so far:

$ git tag my_test_tag_name

This create my new tag in local repo. Now harder part how to add it to remote repo?

1 answer
2 points
Answered by:

Easiest way to push local tag to remote repository is by using:

git push origin our_tag_name

It is similar to git push new branch to remote repo.

Second way is to push all local tags to remote repository:

git push --tags

Before using it, ensure that we don't have any unwanted local tags.

List all local tags with this cmd:

git tag

We can list tags with some pattern:

git tag -l our_tag*

It will list all branches that starts with 'our_tag' prefix.

0 comments Add comment
Native Advertising
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

ÔŁĄ´ŞĆ­čĺ╗ ­čÖé