git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Philip Oakley <philipoakley@iee.org>
Cc: rsbecker@nexbridge.com, 'Bryan Turner' <bturner@atlassian.com>,
	'Eric Kulcyk' <Eric.kulcyk@microsoft.com>,
	git@vger.kernel.org
Subject: Re: Tracking parent branches in Git
Date: Tue, 02 Jul 2019 10:36:13 -0700	[thread overview]
Message-ID: <xmqqef3849v6.fsf@gitster-ct.c.googlers.com> (raw)
In-Reply-To: <77a2b000-f1dc-6f3e-54db-abd227ce6163@iee.org> (Philip Oakley's message of "Tue, 2 Jul 2019 10:23:50 +0100")

Philip Oakley <philipoakley@iee.org> 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???


  reply	other threads:[~2019-07-02 17:36 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-01 18:50 Tracking parent branches in Git Eric Kulcyk
2019-07-01 19:34 ` Junio C Hamano
2019-07-01 19:48   ` Bryan Turner
2019-07-01 20:12     ` rsbecker
2019-07-02  9:23       ` Philip Oakley
2019-07-02 17:36         ` Junio C Hamano [this message]
2019-07-02 18:52           ` Bryan Turner
2019-07-02 19:24             ` Theodore Ts'o
2019-07-03 15:58               ` Philip Oakley
2019-07-01 20:40     ` Eckhard Maaß
2019-07-01 20:58       ` Eric Kulcyk
2019-07-01 21:04         ` Eric Kulcyk
2019-07-02  6:42     ` Andreas Krey

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqef3849v6.fsf@gitster-ct.c.googlers.com \
    --to=gitster@pobox.com \
    --cc=Eric.kulcyk@microsoft.com \
    --cc=bturner@atlassian.com \
    --cc=git@vger.kernel.org \
    --cc=philipoakley@iee.org \
    --cc=rsbecker@nexbridge.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).