[Git] git tag でリリースポイントに印を付ける

[markdown]
重要なコミット履歴に印を付けることができます。
GitHub では、[アーカイブダウンロード](https://github.com/DriftwoodJP/automator-workflows/releases)の区切りとなります。
[/markdown]

[markdown]

> * [Git – タグ](http://git-scm.com/book/ja/Git-%E3%81%AE%E5%9F%BA%E6%9C%AC-%E3%82%BF%E3%82%B0)
> * [タグ操作 | 逆引きGit | サルでもわかるGit入門 〜バージョン管理を使いこなそう〜 | どこでもプロジェクト管理バックログ](http://www.backlog.jp/git-guide/reference/tag.html)
> * [リモート操作 | 逆引きGit | サルでもわかるGit入門 〜バージョン管理を使いこなそう〜 | どこでもプロジェクト管理バックログ](http://www.backlog.jp/git-guide/reference/remote.html)

## タグの一覧

“`
% git tag -n
depot_a Depot Scaffold
depot_b Exercise
depot_b_fix Excercise fix
“`

## タグの作成

“`
% git tag ch.8
“`

過去のコミットにタグを付ける場合は、チェックサムを指定する。

“`
% git tag ch.6 50370963d8d8e49d3e695686173cbed4a8e93491
“`

## タグの削除

“`
% git tag -d depot_a
Deleted tag ‘depot_a’ (was f6a6f23)
“`

## リモートリポジトリにタグをpushする

ローカルの状態。

“`
% git tag -n
ch.6 Depot Scaffold
ch.7 Validation
ch.8 Assertions
“`

push する。

“`
% git push –tags
Total 0 (delta 0), reused 0 (delta 0)
To git@github.com:DriftwoodJP/Agile-Web-Development-with-Rails.git
* [new tag] ch.6 -> ch.6
* [new tag] ch.7 -> ch.7
* [new tag] ch.8 -> ch.8
“`

> * [How can I see tags in Github? – Google グループ](https://groups.google.com/forum/#!topic/github/LtPic6FeQgY)

## リモートリポジトリのタグを削除する

“`
% git push –delete origin TAGNAME
“`

> * [git でリモートのタグやブランチを削除する方法 – Qiita](http://qiita.com/usamik26/items/7e53bae128bf130b8a32)

[/markdown]