Steps:
Check out to a branch say “dev”
>> git checkout dev
>> git log
3rd commit –Upgraded to version 4.4 – 6d2bba2f3a2cde13bce0d3e7e06bc06da71735a4
2nd commit – Upgraded to version 4.3 – 9b3382b0b2ba1e220db747b9eb0a0d1a9a4322d5
1st commit – Added loggers – cabb225b09ba93a22441bf841300904ead51bf28
Suppose if you need to tag the 2nd commit with tag value, v4.3, copy the portion to commit’s hash code
>> git tag -a v4.3 9b3382b0b2 -m “v4.3”
to list all tags >> git tag
to view commit-tag association >> git show v4.4
>> git push origin v4.3
(also see: basic git tagging)
Advertisements