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

Re: Revision ref '@{push}' not resolved as documented

From
Felipe Contreras <felipe.contreras@gmail.com>
Date
Apr 2, 2023, 18:41 UTC
Message-ID
<CAMP44s0ujDcosdU2yDz-o7G8aCswEkpTP=Bfnjgt+5p=D4iHJw@mail.gmail.com>
In-Reply-To
<CAFFOgCUs9d6wJDf3p-+8UkzXRSymCgBctGt+rP+k0CzZPp2LJw@mail.gmail.com>
On Sun, Apr 2, 2023 at 10:41 AM Alexandre Garnier <zigarn@gmail.com> wrote:
Show 10 quoted lines
> # Push is done with the expected remote, and only then the ref can be resolved
> $ git push
> Total 0 (delta 0), reused 0 (delta 0), pack-reused 0
> To ../myfork.git
> * [new branch] mybranch -> mybranch
> $ git rev-parse --symbolic-full-name @{push}
> refs/remotes/myfork/mybranch
>
> So it means the branch has to exist in the remote to resolve '@{push}'
> as a symbolic ref?
It has to exist as a ref.
This is not just for @{push}, same with @{upstream}:
% git config branch.master.merge refs/heads/foobar
Now `master@{upstream}` doesn't work.
> I think I remember that a few years ago the example was working as-is
> without the need to push.

You don't need to push, you can fetch, but the remote ref has to exist, and I think it has always been that way.

Cheers.
-- 
Felipe Contreras
Previous: Alexandre GarnierNext: Junio C Hamano
Message 2 of 3 in “Revision ref '@{push}' not resolved as documented”
  1. Alexandre GarnierApr 2, 2023
  2. Felipe ContrerasApr 2, 2023
  3. Junio C HamanoApr 3, 2023

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.