【发布时间】: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 特定配置更改。
【问题讨论】: