使用 Bonobo Git 服务器将提交推送到 master 的推荐工作流

Recommended workflow for pushing a commit to master using Bonobo Git Server

刚刚安装了最新版本的 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迁移过来的;所以根据错误消息,它们是 'non-bare' repos.

我注意到这里: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 特定配置更改的文档。

我认为如果您将存储库设为“裸机”,这个问题就会消失,这正是 Bonobo 所期望的。我不建议尝试让它与 non-bare 存储库一起工作,因为你将来肯定会遇到 store-up 问题,而且绝对没有任何好处。

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