Skip to content

Commit 06af691

Browse files
committed
Git: タグが迷子になる
1 parent 1147c1b commit 06af691

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

documents/forGitBranch/git_branch_standards.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,7 @@ git merge --no-ff $SOURCE_SHA
445445

446446
# タグ規則
447447

448-
Gitにはタグ機能があり、リリースポイントとしてタグを作成する運用とする。
448+
Gitには[タグ](https://git-scm.com/book/ja/v2/Git-%e3%81%ae%e5%9f%ba%e6%9c%ac-%e3%82%bf%e3%82%b0)機能があり、リリースポイントとしてタグを作成する運用とする。
449449

450450
これにより、リリースしたアプリケーションやライブラリに何か不具合があれば、切り戻しや原因追求が容易になる利点がある。
451451

@@ -471,6 +471,11 @@ $ git tag "v1.0.4" -m "v1.0.4 🐛Fix item api log"
471471
$ git tag "v1.0.4"
472472
```
473473

474+
::: warning タグが迷子になる?
475+
476+
タグはmainなど永続ブランチで作成する必要がある。例えばfeatureブランチでタグを作成し、`git push origin {tag_name}` でリモートにプッシュしたとしても、`rebase` でその紐付けが消えてしまう。なぜなら、タグはコミットのハッシュに付与されるラベルであり、`rebase` でコミットのハッシュが変わると、どのコミットに対するタグなのか分からなくなってしまうからである。
477+
:::
478+
474479
## タグの命名規則
475480

476481
- `v1.2.4` などの [セマンティックバージョニング](https://semver.org/lang/ja/) を基本とする

0 commit comments

Comments
 (0)