Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I add a tag to a Github commit?

Tags:

github

tagging

When making a GitHub commit, how do I tag it using the git command-line options before pushing it to remote repo?

Can something like this be done? git commit -m 'first commit' -tag -a v0.0.1 -m "1st release"

like image 506
Enkouyami Avatar asked Apr 23 '15 17:04

Enkouyami


1 Answers

AFAIK, you cannot commit & tag in one command.

git commit -m "prepare for v1.0.0 release"
git tag v1.0.0
git push origin master --tags

All you can do is connect commands via &&:

git commit -m "prepare for v1.0.0 release" && git tag v1.0.0 && git push origin master --tags
like image 62
Tomas Votruba Avatar answered Oct 21 '22 19:10

Tomas Votruba