git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Tracking parent branches in Git

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 1, 2019, 19:34 UTC
Message-ID
<xmqqpnmt5z19.fsf@gitster-ct.c.googlers.com>
In-Reply-To
<DM5PR00MB040845755401A07E5C90251CF1F90@DM5PR00MB0408.namprd00.prod.outlook.com>
Eric Kulcyk <Eric.kulcyk@microsoft.com> writes:
[Overly long lines are not appreciated around here.]
Show 6 quoted lines
> We would like to track parent branches so that creating pull
> requests can automatically determine the correct branch to merge
> against.  I understand that this would require tracking more
> information than is currently available right now in git.  Also,
> it seems that if some cases, it is not possible to determine a
> parent branch, in which case it would just be empty/null.

Do you mean by "parent branch" what people usually call "upstream branch" (i.e. when that branch on the other side gains more commits independent from what you have been working on, then you would want to rebase your work on top of the updated state of that branch on the other side) around here? Perhaps "git help glossary", look for "upstream branch" and start from there? The entry mentions the configuration variables used to keep track of that information, which are described in "git help config", I think.

> If I made a change to track the parent branch for each branch,
> would this feature be accepted/welcomed as part of git, even if it
> off by default?

Regardless of what is being proposed, this is often not a very useful question. Something worth doing for yourself is worth doing whether others also find it useful ;-) And others usually do not have enough information to judge if such a change is welcome until seeing it in a bit more concrete form.

Thanks.
Previous: Eric KulcykNext: Bryan Turner
Message 2 of 13 in “Tracking parent branches in Git”
  1. Eric KulcykJul 1, 2019
  2. Junio C HamanoJul 1, 2019
  3. Bryan TurnerJul 1, 2019
  4. rsbecker@nexbridge.comJul 1, 2019
  5. Philip OakleyJul 2, 2019
  6. Junio C HamanoJul 2, 2019
  7. Bryan TurnerJul 2, 2019
  8. Theodore Ts'oJul 2, 2019
  9. Philip OakleyJul 3, 2019
  10. Eckhard MaaßJul 1, 2019
  11. Eric KulcykJul 1, 2019
  12. Eric KulcykJul 1, 2019
  13. Andreas KreyJul 2, 2019

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.