Re: Terminology question: "tracking" branches
- From
Michael J Gruber <git@drmicha.warpmail.net>
- Date
- Oct 23, 2008, 08:07 UTC
- Message-ID
- <490030AB.8090207@drmicha.warpmail.net>
- In-Reply-To
- <20081022161302.GC16946@atjola.homenet>
Björn Steinbrink venit, vidit, dixit 22.10.2008 18:13:
Show 10 quoted lines
> On 2008.10.22 16:59:58 +0200, Michael J Gruber wrote: >> - a remote branch (a branch in your local repo which is a copy of a >> branch in a remote repo; stored under refs/remotes, never to be modified >> locally) >> - a (remote) tracking branch (a local branch which is set up to pull >> from a remote branch by default) > > (Remote) tracking branches are actually what you called remote branches, > at least according to the git glossary. But I wonder, what is the right > term for a branch that has the --track setup for pull?
Ooops, I'm sorry. I went by the name of the "--track" option and was sure that that "git help branch" used the name "tracking branch" for the branches created with "--track", but I was wrong. So:
"(remote) tracking branch" is a local branch stored under refs/remotes/ which is a "copy" of a branch on a remote repository.
That leaves open:
- What does "remote branch" mean, if it means anything at all? It could be used for a branch in a remote repository, i.e. the other side of fetch/push refspec (remote branch:tracking branch).
- How to name a local branch created with --track off of a (remote) tracking branch? Local tracking branch? Downstream/work/modification branch?
I think that linguistically, the confusion comes from using the noun as well as the adjective "remote". As an adjective: "remote something" cleary is something residing remotely. As a noun it's the config added by "git remote add".
Note that the glossary doesn't define remote at all. I'd volunteer changing that once the discussion reaches a consensus.
My suggestion would be:
remote (noun): A configuration as created by "git remote add" which points to a remote repository (using a URL) and sets up refspecs for fetching and/or pulling. Note that the URL may point to a local filesystem or even ".". See also remote (adjective).
remote (adjective): Anything residing in another repository. See also remote (noun).
local: Sometimes used to emphasize things residing "locally", i.e. in the repository at hand, as opposed to "remotely".
tracking branch: A branch tracking a (remote) branch on a remote repository, i.e. a local branch stored under refs/remotes/ which is a "copy" of a branch on a remote repository; typically created by "git clone" or "git remote add/update".
remote tracking branch: Synonymous with tracking branch. [remote is a noun, an object for track here]
[adjective to be found] branch: A local branch which is set up to pull or rebase automatically from a tracking branch. Used for local modifications to remote branches. [I'm tempted to use local tracking branch here, but that would just add to the confusion.]
Come to think of it: "Off-track" branch would be the ideal name for a local branch created off of a (remote) tracking branch, using --track to specify the track where things go off. But I'm not sure everyone would like the implied pun...
Cheers, Michael