How do you tag a specific commit in Git?
a)
git tag tagname commit-hashb)
git tag -m commit-hashc)
git annotate commit-hashd)
git commit -tAnswer:
a)
git tag tagname commit-hashExplanation:
The git tag tagname commit-hash command tags a specific commit in Git by providing the tag name and commit hash. This allows you to mark a specific commit with a tag, even if it’s not the latest commit on a branch.
For example, running git tag v1.0 abc123 tags the commit with hash abc123 as version 1.0.
Tagging specific commits is useful for marking important milestones, such as software releases, in your project.