通常的工作流程是,git tag verify。
git tag -v tagname
然后git tag checkout。
git checkout tagname
是否有一个组合命令来验证标签,显示验证,验证是否成功?
最佳答案
在 bash shell 中:
git tag -v tagname && git checkout tagname
这只会起作用 if the first command succeeds .
例如,它可以是 post-receive
的一部分钩子(Hook)。
或者它可以成为一个独立的命令:
即使在 Windows 上,脚本名称 git-ctag
(放在 %PATH%
中的任何位置)将使您能够键入 git ctag <atag>
,只有在验证步骤通过时才会 checkout 标签。
#!/bin/bash
git tag -v $1 && git checkout $1
关于git - 用于 git 标记验证和 git checkout 的组合命令?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25966013/