4
1
I just installed Gitolite on a server, so any repositories that I'm pushing into on it should be bare repositories, and I've even went into the repo directories, and ran git init --bare
in them to make sure that they are bare, but when I try to push into them, I still get this error message:
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
remote: error: with what you pushed, and will require 'git reset --hard' to match
remote: error: the work tree to HEAD.
remote: error:
remote: error: You can set 'receive.denyCurrentBranch' configuration variable to
remote: error: 'ignore' or 'warn' in the remote repository to allow pushing into
remote: error: its current branch; however, this is not recommended unless you
remote: error: arranged to update its work tree to match what you pushed in some
remote: error: other way.
remote: error:
remote: error: To squelch this message and still keep the default behaviour, set
remote: error: 'receive.denyCurrentBranch' configuration variable to 'refuse'.
I even ran git config receive.denyCurrentBranch ignore
to try to get it to just push into the remote repo, but the error still comes up.
I'm not sure what I'm doing wrong here.
1
Check this link: http://bitflop.com/tutorials/git-bare-vs-non-bare-repositories.html - It explains the differences between bare and non-bare repos.
– Meetai.com – 2015-09-23T15:25:55.803Updating the link URL posted in the comment http://www.bitflop.dk/tutorials/how-to-create-a-new-and-empty-branch-in-git.html
– None – 2016-08-08T20:47:32.337