git http-backend error message

From: Jeremiah Foster <hidden>
Date: 2016-06-15 22:48:26

Hello,

	I've recently installed git 1.7.0.2 to enable serving git repositories in an efficient fashion over http. Thanks to the excellent documentation here: http://www.kernel.org/pub/software/scm/git/docs/git-http-backend.html I was able to set up the git repo with ldap on debian with apache2 fairly quickly. 

	What I cannot do is push back to the repo. I can check out a complete git repo, add to it, commit. But when I do;

	'git push origin master' 

	I get this error:

error: refusing to update checked out branch: refs/heads/master
error: By default, updating the current branch in a non-bare repository
error: is denied, because it will make the index and work tree inconsistent
error: with what you pushed, and will require 'git reset --hard' to match
error: the work tree to HEAD.
error: 
error: You can set 'receive.denyCurrentBranch' configuration variable to
error: 'ignore' or 'warn' in the remote repository to allow pushing into
error: its current branch; however, this is not recommended unless you
error: arranged to update its work tree to match what you pushed in some
error: other way.
error: 
error: To squelch this message and still keep the default behaviour, set
error: 'receive.denyCurrentBranch' configuration variable to 'refuse'.

	I am unclear about my next move. Should I just set receive.denyCurrentBranch to 'warn' and then my commits locally will go back up to the server? 
	Or is it smarter to just create a bare repository, clone some content into it, and then push?

Thanks,

	Jeremiah
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help