Re: Tracking parent branches in Git

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

 



On Tue, Jul 2, 2019 at 10:36 AM Junio C Hamano <gitster@xxxxxxxxx> wrote:
>
> In this whole thread, I have been wondering if I am missing
> something crucial, but now I am deeply puzzled why after many people
> made comments, nobody raises a question about the "--no-track" thing
> in the early message in the thread.
>
> If you do not add that, i.e.
>
>         $ git checout -t -b bturner-some-bugfix origin/release/5.16
>
> (note that I added '-t' for illustration, but it should be on by
> default when starting from origin/<whatever>), then you'd get in
> your configuration file these recorded:
>
>         $ git config --get-regexp 'branch\.bturner-some-bugfix\..*'
>         branch.bturner-some-bugfix.remote origin
>         branch.bturner-some-bugfix.merge refs/heads/release/5.16
>
> You created 'bturner-some-bugfix' branch out of the 'release/5.16'
> branch taken from the remote whose name is 'origin'.
>
> Is that different from the answer to the question being sought?
> What am I missing???

Sorry, I should have clarified my "--no-track" in my original message
when I provided the example. I did "--no-track" because if I push
"bturner-some-bugfix" to a server, I'm likely going to do something
like "git push -u origin bturner-some-bugfix" so that my local
"bturner-some-bugfix" branch will track the remote version of itself.
At that point, the remote-tracking information would change from
"release/5.16" to "bturner-some-bugfix" (without any sort of warning,
for whatever that's worth), effectively "losing" the ancestry.

The other issue is that my local remote-tracking information doesn't
help the server I'm talking to; it's not shareable. Assuming I could
use remote-tracking to track ancestry, there's still no way to
communicate that to the server so that it could know, when I go to
create a pull request for "bturner-some-bugfix", that it's tracking
"release/5.16" in my local repository.

I could certainly be misunderstanding the request, but I think it's
asking for something less ephemeral--and more shareable--than
remote-tracking, and it seems logical to want to be able to retain
ancestry while still using remote-tracking setup such that local
branches still track the remote version of themselves, rather than
some other (albeit related) branch.

Best regards,
Bryan Turner



[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