- 我致力于掌握
- 我使用
git tag -v v1.7 -m "foo"
为此次提交创建了一个标签 - 我 checkout 了一个标签
git checkout v1.7
(master 指向相同的提交 ID) - 然后我创建了一个提交
- 然后我使用
git tag -v v1.8 -m "bar"标记此提交
如何让 master 与标签 v1.8
具有相同的提交 ID
最佳答案
How do I get master to be at the same commit ID as the tag v1.8
如果在您创建 v1.8
时 master
上没有新的提交,
然后您可以切换到它并从 v1.8
merge 以使 master
快进到 v1.8
:
git checkout master
git merge v1.8
关于git - 将主控转发到标签,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46620622/