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

Invalid refspec?

From
Samuel Tardieu <sam@rfc1149.net>
Date
Mar 20, 2008, 10:53 UTC
Message-ID
<2008-03-20-11-53-31+trackit+sam@rfc1149.net>

I am using git master branch locally (1.5.5.rc0.133.g7e207), and the server is using 1.5.4.rc3.g16335. I want to push my HEAD~1 revision into the 2.0 branch on the server, and it looks like it is not expanded anymore in the refspec:

% git push origin HEAD~1:2.0 fatal: Invalid refspec 'HEAD~1:2.0' fatal: The remote end hung up unexpectedly

Isn't HEAD~1 supposed to be expanded locally? Using the SHA-1 instead of HEAD~1 works fine.

  Sam
-- 
Samuel Tardieu -- sam@rfc1149.net -- http://www.rfc1149.net/
Next: Daniel Barkalow
Message 1 of 5 in “Invalid refspec?”
  1. Samuel TardieuMar 20, 2008
  2. Daniel BarkalowMar 20, 2008
  3. Junio C HamanoMar 20, 2008
  4. Daniel BarkalowMar 20, 2008
  5. Junio C HamanoMar 20, 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.