Reputation: 107
How do you give a git commit a name?
E.g., from this Angular JS tutorial (click Workspace Reset Instructions):
git checkout -f step-2
How did they name the commit step-2
?
Upvotes: 8
Views: 7966
Reputation: 1324063
You wouldn't use git tag
alone, as it produces a lightweight tag (a tag reference for the SHA-1 object name of the commit object).
In the case of the angular/angular-phonecat, they use:
git tag -m "step-2 angular template with repeater" step2
Adding a comment is enough to make it an "annotated" tags; they contain a creation date, the tagger name and e-mail, a tagging message, and an optional GnuPG signature.
As you can see, step2 is a release (annotated) tag.
Upvotes: 6