Re: Tracking parent branches in Git

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

 



Philip Oakley <philipoakley@xxxxxxx> writes:

>> I suspect the question is in regards to "What branch did I create
>> my local branch from?", especially given the pull request
>> reference.
>>
>> In other words, when I locally do:
>> git checkout --no-track -b bturner-some-bugfix origin/release/5.16
>>
>> release/5.16 is the "parent branch" of my bugfix branch...
>> ...
> From the Git side, maybe one could simply populate the branch
> description with the commit oid and branched-from name at the time of
> branch creation (no doubt set as a core.option).
> The field is already there and almost never used - there's no easy way
> (via git command) to populate the description anyway. Plus its a local
> field, keeping Git distributed.

I do not think you want branch.description to get mixed-up in this.

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




[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