git/list[1] front-page[2] threads[3] people[4] search[5] about
 

git http-backend error message

From
Jeremiah Foster <jeremiah.foster@pelagicore.com>
Date
Mar 15, 2010, 16:13 UTC
Message-ID
<A55E5483-425E-4303-87F2-FABC46F6BFE5@pelagicore.com>
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
Next: Junio C Hamano
Message 1 of 4 in “git http-backend error message”
  1. Jeremiah FosterMar 15, 2010
  2. Junio C HamanoMar 15, 2010
  3. Jeremiah FosterMar 16, 2010
  4. Scott R. GodinApr 5, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.