Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add TAG to a already committed in Git and Bitbucket

I already committed but missed to TAG it,Is it possible to add TAG to already committed code i am using Git and Bitbucket So far i tried with the below git bash commands

1. git tag "v1.0" fd5j6dj
2. `git tag -a v1.2 9fceb02 -m "Message here"` 

Still no luck can you please suggest anything which would work

like image 660
Abhijit Chakra Avatar asked Jun 08 '16 07:06

Abhijit Chakra


2 Answers

You can tag it later and run git push --tags to update the tags to the remote repo, so you never miss it. But in some teams, to push tags may need permission.

like image 168
ElpieKay Avatar answered Sep 23 '22 22:09

ElpieKay


Now, suppose you forgot to tag the project at v1.2, which was at the commit. You can add it after the fact. To tag that commit, you specify the commit checksum (or part of it) at the end of the line for this case its 6fcub07:

$ git tag -a v1.2 6fcub07

You can see that you’ve tagged the commit:

like image 42
Mfuon Leonard Avatar answered Sep 20 '22 22:09

Mfuon Leonard