【问题标题】:Recommended workflow for pushing a commit to master using Bonobo Git Server使用 Bonobo Git Server 将提交推送到 master 的推荐工作流程
【发布时间】:2020-08-06 15:50:29
【问题描述】:

刚刚安装了最新版本的 Bonobo Git 服务器(6.5.0)。虽然有点尴尬,但我们无法将提交推送到 master。

所需的工作流程只是克隆->编辑->提交->推送到主控

我们能够创建自己的分支并推送到该分支,但是推送到 master 会产生错误:

remote: error: refusing to update checked out branch: refs/heads/master
remote: error: By default, updating the current branch in a non-bare repository
remote: error: is denied, because it will make the index and work tree inconsistent
...

问题可能是因为我们所有的 repos 都是使用 git-svn clone 从 SVN 迁移过来的;因此,根据错误消息,它们是“非裸”存储库。

我注意到这里:Git Push error: refusing to update checked out branch

这样一个命令:

git config --global receive.denyCurrentBranch updateInstead

为很多人解决了很多情况下的问题;但是我不确定如何在倭黑猩猩上进行这项工作。如果我从 ~\App_Data\Git\ 发出命令,例如使用 Bonobo 内置的 git 二进制文件;它没有效果。我还看到 ~\App_Data 文件夹中有一个 .gitconfig 文件 - 但没有文档用于对 Bonobo 进行全局 git 特定配置更改。

【问题讨论】:

    标签: git bonobo


    【解决方案1】:

    我认为如果您将存储库设为“裸露”,这个问题就会消失,这正是 Bonobo 所期望的。我不建议尝试使其与非裸存储库一起使用,因为您必然会为将来存储问题,而且绝对没有任何好处。

    请参阅此处:How to convert a normal Git repository to a bare one? 了解如何解决此问题。

    【讨论】:

    • 谢谢 - 是的,我已经看过这篇文章了。接受的答案不适用于倭黑猩猩;但是 git clone --mirror 是一个很好的解决方案,我认为可以解决我的问题,所以最后,经过测试,我决定采用它。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2014-08-18
    • 2013-04-08
    • 1970-01-01
    • 1970-01-01
    • 2012-07-25
    • 2015-08-14
    • 2021-11-23
    相关资源
    最近更新 更多