简体   繁体   English

Jenkins Git分支始终显示HEAD脱离

[英]Jenkins Git branch is always shows HEAD detached at

In Jenkins Source Code Management, I put refs/heads/dev into the Branches to build->Branch Specifier (blank for 'any'). 在Jenkins源代码管理中,我将refs/heads/dev放入Branchs中以构建-> Branch Specifier(“ any”为空白)。

And in the physical machine which Jenkins server depends on, when I type in git branch , I would expect it to should show * dev as current branch instead of * (HEAD detached at 0952s96) . 在Jenkins服务器所依赖的物理机器上,当我输入git branch ,我希望它显示* dev作为当前分支而不是* (HEAD detached at 0952s96)

It's the expected result of git checkout refs/heads/dev . 这是git checkout refs/heads/dev的预期结果。 Try dev instead of refs/heads/dev . 尝试使用dev而不是refs/heads/dev But in most cases, it doesn't matter if it's in detached HEAD state as long as HEAD and refs/heads/dev point to the same commit. 但是在大多数情况下,只要HEADrefs/heads/dev指向同一提交,它是否处于分离的HEAD状态都没关系。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM