0

Just installed the latest version of Bonobo Git server (6.5.0). It's working great mostly although kind of awkwardly we're not able to push our commits to master.

The desired workflow is simply clone->edit->commit-> push to master

We're able to create our own branches & push to that however pushing to master yields the error:

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
...

The problem is probably due to the fact that all of our repos were migrated over from SVN using git-svn clone; so per the error message they are 'non-bare' repos.

I noticed here: Git Push error: refusing to update checked out branch

That a command such as this one:

git config --global receive.denyCurrentBranch updateInstead

Fixed the problem in many cases for a lot of folks; however I'm unsure as to how to make this work with respect to bonobo. If I issue the command from ~\App_Data\Git\ e.g. using the git binary built into Bonobo; it has no effect. I also see that theres a .gitconfig file in the ~\App_Data folder - but there's no documentation for making global git specific configuration changes to Bonobo.

Reece
  • 641
  • 7
  • 18

1 Answers1

1

I think this problem will go away if you make your repositories "bare", which is what Bonobo is expecting. I wouldn't advise trying to make it work with non-bare repositories, because you're bound to store-up problems for the future, and there's absolutely no benefit.

See here: How to convert a normal Git repository to a bare one? for how to sort this out.

Will Dean
  • 39,055
  • 11
  • 90
  • 118
  • Thanks - yes I'd already come across this article. The accepted answer doesn't work with bonobo; but git clone --mirror is a good solution I think to solve my problem so in the end, after testing it I've decided to go with that. – Reece Aug 11 '20 at 20:23