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

Re: Problems pushing???

From
KKKonstantin Khomoutov <kostix+git@007spb.ru>
Date
Jul 8, 2012, 11:02 UTC
Message-ID
<20120708110244.GA14518@localhost.localdomain>
In-Reply-To
<1341738766823-7562695.post@n2.nabble.com>
On Sun, Jul 08, 2012 at 02:12:46AM -0700, pbGit wrote:
Show 16 quoted lines
>   I have installed git locally to my machine.  It is running mac os lion. 
> This is intended to be the remote machine too. I have followed, what I think
> is the correct way to do this, using 
> http://www.petermac.com/setup-git-local-and-remote-repositories/ this .  All
> seemed to be ok until I tried to push.  When I try the following command.
> 
> git push --all --repo=<project>
> 
> I get the following output
> 
> Counting objects: 12, done.
> Delta compression using up to 4 threads.
> Compressing objects: 100% (11/11), done.
> Writing objects: 100% (12/12), 5.23 KiB, done.
> Total 12 (delta 1), reused 0 (delta 0)
> remote: error: refusing to update checked out branch: refs/heads/master
[...]
> Hope someone can help with this because I have spent a bit of time trying to
> solve this and still stuck!!!

Becasue pushing to a so-called "non-bare" repository (this is a "normal" repository, in which there is a work tree) either has no sense or requires extra steps to reconcile the results of pushing with the repository's work tree. Most probably you should reconsider your workflow.

Read [1] for an in-depth explanation. Googling for "receive.denyCurrentBranch" will also provide you with a number of useful links (such as stackoverflow discussions).

1. http://sitaramc.github.com/concepts/bare.html
Previous: pbGitNext: Holger Hellmuth
Message 2 of 8 in “Problems pushing???”
  1. pbGitJul 8, 2012
  2. Konstantin KhomoutovJul 8, 2012
  3. Holger HellmuthJul 8, 2012
  4. Konstantin KhomoutovJul 8, 2012
  5. pbGitJul 8, 2012
  6. pbGitJul 8, 2012
  7. Holger HellmuthJul 8, 2012
  8. pbGitJul 10, 2012

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.