Back

Explore Courses Blog Tutorials Interview Questions
+4 votes
2 views
in DevOps and Agile by (29.3k points)
edited by

I have a repository in GitHub and I need to tag it. I tagged in a shell, but on GitHub, it is not showing up. Do I have to do anything else?

The command I used in the shell is:

git tag 2.0

And now when I type git tag it shows:

2.0

So it seems like tags are present, correct?

The repository is https://github.com/yeshu4/website.

How do I make this tag show up on GitHub? Where are my tags?

1 Answer

+3 votes
by (50.2k points)

There are two ways to create a tag 

From command line

Github’s interface

Let’s see how it can be done

To create a tag on your current branch, run this:

git tag <tagname>

To describe your tag:

git tag <tagname> -a

This will create a local tag with the current state of the branch you are on. When pushing to your remote repo, tags are NOT included by default. You will need to explicitly say that you want to push your tags to your remote repo:

git push origin --tags

if you just want to push a single tag:

git push origin <tag>

Then it will be pushed to the Github using the above commands.

Refer: https://git-scm.com/docs/git-push

Creating tags using Github’s interface.

1. Click on release on your repository

image

2. Create a new release

image

3. Give your tag here

image
4. Then publish those release
imageThus you can create a tag from the github interface.

Browse Categories

...