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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Apr 2, 2023 at 10:41 AM Alexandre Garnier <zigarn@xxxxxxxxx> wrote:

> # 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




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux