How to add tags on the git repository?
I didn’t know how to add tags on git. I researched a while, I reached to the simple commands. I’ll introduce some of them.
Usage of the “git tag”
Most usable options are “-a” and “-m”. “-a” is specifies a tag name and “-m” is for the comment of the tag.
$ git tag -a v0.1 -m 'Version 0.1. It is not stable yet.'
You can check all the tags available by simply issuing “git tag” command.
$ git tag
If you want to search for repositories for tag name, you can use regexp with -l option.
$ git tag -l 'v0.*' v0.1 (it will display more, if you have v0.x tags)
“git show TAG_NAME” will help you understand what the tag means.
$ git show v0.1
tag v0.1
Tagger: Yasunori Mahata
Date: Sun Mar 14 16:32:23 2010 +0900
Version 0.1. It is not stable yet.
commit xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Author: Yasunori Mahata
Date: Sun Mar 14 15:24:31 2010 +0900
added bin directory
...
I reffered following article regarding this contents. Thanks a lot.
How to add empty directory on the git repository?
Sometimes, you may want to add empty directory on the git repository. But “git add” can’t treat empty directory well. So what should we do?
.gitignore will help you. mkdir and create .gitignore file into it will help you. Issue commands like this:
$ mkdir a_directory $ touch a_directory/.gitignore $ git add a_directory
I reffered following article regarding this contents. Thanks a lot.