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