gpt4 book ai didi

eclipse - Refspec HEAD :refs/for/refs/heads/master generated by eGit/ZendStudio 9 mean? 是什么

转载 作者:太空狗 更新时间:2023-10-29 14:08:40 26 4
gpt4 key购买 nike

在 ZendStudio 9 中从 Git 建立一个项目。(基于 eclipse 和 eGit)

它生成一个安静的正常获取 refspec:

Remote Fetch Specification  +refs/heads/*:refs/remotes/original/*

但是一个非常神秘的推送 refspec:

Remote Push Specification   HEAD:refs/for/refs/heads/master

在远程我可以通过“git ls-remote”看到以下内容:

8db575549dea67a45cea04358f902993c940c4d8        HEAD
16f0939153e6ef12b4596f0d4fb43fa5b8b0246b refs/for/refs/heads/master
8db575549dea67a45cea04358f902993c940c4d8 refs/heads/master

我在本地机器上有“git status”的消息:

On branch master
Your branch is ahead of 'original/master' by 5 commits.

所以,请注意,因为我的问题不是“这是什么意思”...

我的问题是:

  • 这个工作流程意味着什么?意义是什么?
  • 在服务器“refs/for..”上生成的 Ref 是做什么用的?
  • 在本地分支上工作而不是在服务器上推送 ref 不是更好吗?

提前致谢。

最佳答案

一个,通常的 Gerrit 相关 refspec 应该是(如 commented by jszakmeister in "Gerrit Code Review - Uploading Changes ")

HEAD:refs/for/branchname

所以,如果有的话,应该是

HEAD:refs/for/master

但在你的情况下,你不需要那种 refspec(因为你没有 Gerrit)

Is this a usual way to commit,

不,不是。

is it a bad default, worth nothing?

在您的情况下,是的,它没有用。

这可能是 this thread 的副作用提及:

Indeed, Gerrit is integrated and shipped together with EGit feature. Currently there is no way to disable Gerrit from within Zend Studio.

bug 347077 "Make Gerrit features Optional"仍然开放。


OP tweini comments :

To go out of this trap, iI had to realize, that this ref is creating a branch on remote without a remote tracking branch associated with it.

But to get rid of it is pretty easy:

  • Change push refspec in .git/config to push = refs/heads/master:refs/heads/master,
  • Push your local repo to remote git push
  • Delete the branch on remote git push --delete origin refs/for/refs/heads/master

关于eclipse - Refspec HEAD :refs/for/refs/heads/master generated by eGit/ZendStudio 9 mean? 是什么,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13830065/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com