Refspec和Branch 说明符(默认为空白)有什么区别:在下面的 Jenkins 作业配置中:
我试图在作业配置中设置 Refspec 选项:
+refs/heads/master:refs/remotes/origin/master
在我的构建从站的克隆仓库中,.git/config 文件如下所示:
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
[remote "origin"]
url = https://user:pass@git.internal.com/scm/PROJECT/project.git
fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
remote = origin
merge = refs/heads/master
似乎fetch的值不正确(从 jenkins 作业配置中读取)。此外,它对磁盘空间消耗没有影响。