Use of GIT TAG command in GIT

Use of GIT TAG command in GIT:

1. Tag command is one more use full command which will maintain the release level log.

2. Whenever live release is happening then better create one tag (copy of first release) to maintain the history.

3. Tag command will tag a copy of your first release. This will helpful in case you want to back to any specific release.

git tag <VERSION>

Ex: git tag V1.0.0 

(OR)

git tag <VERSION> <LAST COMMIT ID>
Ex: git tag V2.0.0 f0d9880

Here f0d9880 is my last commit id from this commit only i create tag.

(or)

git tag -a v1.0 -m 'This is version 1.0 tag'

Delete unwanted TAG

 git tag -d <TAG VERSION> 

Ex: Here am going to create new tag which is my first production release of the website

git tag -a R0.1 -m “Initial base version taging” 

git push –tags origin master 

git tag -l (This command will list out all the tag)