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

Re: unable to push

From
Jeff King <peff@peff.net>
Date
Jun 1, 2008, 18:24 UTC
Message-ID
<20080601182417.GB742@sigill.intra.peff.net>
In-Reply-To
<48418242.1050606@users.sourceforge.net>
On Sat, May 31, 2008 at 06:52:18PM +0200, Adam Piątyszek wrote:
Show 20 quoted lines
>>> root@asgard:/var/www/adastra/xml2pdf/current# git ls-remote public
>>> d3f3d8474db1c006a53be8b5f5c1a0d866d7e357        HEAD
>>> d3f3d8474db1c006a53be8b5f5c1a0d866d7e357        refs/heads/localmaster
>>
>> So you have only one branch, "localmaster".
>>
>>> root@asgard:/var/www/adastra/xml2pdf/current# git ls-remote .
>>> 71ab4eea48eb3407a2ff4eef2befe9251897d676        HEAD
>>> 71ab4eea48eb3407a2ff4eef2befe9251897d676        refs/heads/master
>>
>> But the remote has only one branch, "master".
>>
>> If you want to push your localmaster to his master, you can do:
>>
>>   git push origin localmaster:master
> [...]
>
> I guess Peef described it the opposite way. In my opinion "localmaster"  
> is the only branch on the remote "public" repository and the local  
> repository has only one "master" branch.

Oh, sorry, I did totally read that backwards. So yes, there is a local "master" branch but not a remote master branch (instead it has "localmaster"). So the problem is the same (push without a refspec pushes matching refs, and you don't have any matches) but the fix is, as Adam pointed out:

> So to push local "master" to the remote "localmaster" branch you should use:
>
>   git push public master:localmaster
Sorry for the confusion.
-Peff
Previous: Adam Piątyszek
Message 11 of 11 in “unable to push”
  1. david@lang.hmMay 31, 2008
  2. Jeff KingMay 31, 2008
  3. david@lang.hmMay 31, 2008
  4. Jeff KingJun 1, 2008
  5. Jeff KingJun 1, 2008
  6. david@lang.hmJun 1, 2008
  7. Jeff KingJun 1, 2008
  8. david@lang.hmJun 1, 2008
  9. Jeff KingJun 1, 2008
  10. Adam PiątyszekMay 31, 2008
  11. Jeff KingJun 1, 2008

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.