CAREFUL: In the command in Lawakush Kurmi's answer (git tag -a v1.0
) the -a
flag is used. This flag tells Git to create an annotated flag. If you don't provide the flag (i.e. git tag v1.0
) then it'll create what's called a lightweight tag.
Annotated tags are recommended, because they include a lot of extra information such as:
Because of this, you should always use annotated tags.