Add a tag
Use the git tag command to add a new tag named tag1
.
$ git tag tag1
Then, run the tag command without any parameters, and you’ll see a list of tags in this repository, including the one we just added.
$ git tag
tag1
To see the history log with tag information, execute the git log command with the --decorate
option.
$ git log --decorate
commit e7978c94d2104e3e0e6e4a5b4a8467b1d2a2ba19 (HEAD, tag: tag1, main)
Author: yourname <yourname@yourmail.com>
Date: Wed Jul 18 16:43:27 2022 +0900
first commit
This is how our history looks now.
