How to tag a version.

It is a good idea to add tags to specific commits.

Tag overview

git tag     : show all tags

Add an annotated tags: recommended

Annotated tags are stored as full objects in the Git database. Containing the tagger name, email, date, have a tagging message.

git tag -a v3.1.0 -m "Release 3.1.0"            : add an annotated tag to current commit with message
git tag -a v3.1.0 -m "Release 3.1.0" SHA        : add an annotated tag to a commit with SHA and add message

Adding a simple tag: not recommended

A simple tag is very much like a branch, but it doesn’t change location and is fixed to one commit.

git tag v3.01          : add a simple tag to current commit
git tag v3.01 SHA       : add a simple tag to commit with SHA

It is recommended to use the “-a” option for annotated tags.

Push a tag

By default, the git push command doesn’t transfer tags to remote servers. You will have to explicitly push tags to a shared server.

git push origin <tagname>
git push origin v3.1.0
Spread the love

Geef een reactie

Specify Facebook App ID and Secret in Super Socializer > Social Login section in admin panel for Facebook Login to work

Specify GooglePlus Client ID and Secret in Super Socializer > Social Login section in admin panel for GooglePlus Login to work

Je e-mailadres zal niet getoond worden. Verplichte velden zijn gemarkeerd met *