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

Feature request: Tracking info for remote branches

From
SMStefan Monnier <monnier@iro.umontreal.ca>
Date
Oct 3, 2014, 14:32 UTC
Message-ID
<jwvy4sxqm1a.fsf-monnier+gmane.comp.version-control.git@gnu.org>

I really like the way Git officializes the relation between branches via the notion of "tracking". I can see which local branch tracks which remote branch easily, and that's very helpful.

But when I find a Git repository on the Web, I often have no idea about the relationship between its branches, all I have instead is the branches's names, which is often not sufficient.

Let's take for example https://bitbucket.org/emiliolopez/linux.git. Among its branches I see "sunxi-codec" and "sunxi-codec-v0".

The repository name gives me a hint that these are really branches of the Linux kernel (rather than, say, branches of Emacs). And the branches's names gice me a hint that these are related to support for sunxi (aka Allwinner SoCs) and more specifically support for codecs. I know from out-of-band info that these are for audio codecs.

But I don't know if these branches track linux-next, sunxi-devel, or
some other branch.  I can manually try to find out, by comparing the
distance to each one of those branches.  But:
- it's costly.
- it can only be done manually, because a script wouldn't know that
  linux-next and sunxi-devel are better candidate branches than, say,
  emacs-24.
- as a consequence, front ends (bitbucket, cgit, gitweb, younameit)
  can't show this information.

So, I'd like to suggest that Git be changed so that the branch tracking information is also maintained and made available for remote branches. E.g. when you push a branch, the info about which is the corresponding target branch (if any) be also pushed to the remote repository along with the actual new commits. Similarly, when cloning a remote repository, that information should be copied locally so you can ask Git about the relationship between those remote branches you just downloaded.

        Stefan
Message 1 of 1 in “Feature request: Tracking info for remote branches”
  1. Stefan MonnierOct 3, 2014

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.