用git子树检出特定的标签 [英] checkout a specific tag with git subtree
问题描述
我可以在子树中使用标签吗?特定问题之后:
我有一个包含外部存储库作为子树的git存储库。
我可以添加这个外部存储库并从这个回购中签出一个特定的分支。用 git subtree pull --prefix =< dir> --squash< remote> < branch>
所选分支的更新效果良好。
现在可以检出特定标签吗?我找不到有关子树中标签的一些信息...
实际上,任何引用都应该起作用。
git subtree pull -P< prefix> <库> < REF>
其中< ref>
可以是一个SHA,标签或分支。基本上任何git都可以解析为提交。
Can I use tags in subtrees? Following a specific issue:
I have a git repository which includes an external repository as a subtree.
I could add this external repository and checkout a specific branch from this repo. With git subtree pull --prefix=<dir> --squash <remote> <branch>
the update from the selected branch works well.
Now is it possible to checkout a specific tag? I couldn't find some information about tags in subtrees...
Actually any reference should work. The man page for subtree displays this.
git subtree pull -P <prefix> <repository> <ref>
Where <ref>
can be a SHA, tag or branch. Basically anything git can resolve to a commit.
这篇关于用git子树检出特定的标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!