yuuka_maniaの日記: git worktree
日記 by
yuuka_mania
長いこと、 git worktree で、任意のタグなどを checkout した時にでる、warning について、調べてみた。
% git worktree add -b release-1.16.0 ../1.16.0 refs/tags/release-1.16.0
warning: refname 'release-1.16.0' is ambiguous.
Preparing ../1.16.0 (identifier 1.16.0)
HEAD is now at 144242b0 nginx-1.16.0-RELEASE
どうも、タグ名と同じブランチ名を作ってることが原因の模様。なるほど。確かに、これ以降、 ambiguous になるわな。
ということで、ブランチ名は何かしら、一意な名前にすることを心がけたほうがよさそう。頭か、お尻に、何かつけるとかがいいのかなぁ。それはそれで冗長なわけだけど。
% git worktree add -b 1.17.0 ../1.17.0 refs/tags/release-1.17.0
Preparing ../1.17.0 (identifier 1.17.0)
HEAD is now at 8a779e20 nginx-1.17.0-RELEASE
まとめ
========
とりあえず、スッキリしました。
git worktree More ログイン