{"thread":{"id":"30766","subject":"\"remote-tracking branch\"?","startedAt":"2012-06-11T14:54:05Z","lastAt":"2012-06-11T16:46:06Z","messageCount":3,"participants":["Marc Branchaud","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"193306","messageId":"4FD6068D.1010509@xiplink.com","threadId":"30766","inReplyTo":null,"subject":"\"remote-tracking branch\"?","fromName":"Marc Branchaud","fromEmail":"marcnarc@xiplink.com","sentAt":"2012-06-11T14:54:05Z","receivedAt":"2012-06-11T14:54:05Z","isPatch":false,"sender":{"key":"marcnarc@xiplink.com","avatar":"https://avatars.githubusercontent.com/u/14980203?v=4"},"body":"On 12-06-11 06:04 AM, Lucien Kong wrote:\n> \"git rebase -i\" can be very dangerous if used on an already published\n> history. This code detects that one is rewriting a commit that is an\n> ancestor of a remote-tracking branch, and warns the user through the\n> editor. This feature is controlled by a new config key\n> rebase.checkremoterefs.\n\nWhen I first read this I was confused by the term \"remote-tracking branch\".\nI see that the docs for \"git remote\" and \"git branch\" use this term for\nbranches like 'origin/master', as does the glossary.\n\nBut to me 'origin/master' is simply a \"remote branch\".  In my mind, a\n\"remote-tracking branch\" is a local branch with its \"remote\" and \"merge\"\nconfig values set.  So if my local config has\n\tbranch.public.remote = origin\n\tbranch.public.merge = refs/heads/master\nthen my local 'public' branch is a \"remote-tracking branch\" that tracks the\n'master' branch in the 'origin' repository.\n\nI feel my interpretation is reinforced by the --track/--no-track options in\n\"git branch\".\n\nI believe the docs would be clearer if they used the terms \"remote branch\"\nand \"remote-tracking branch\" in this way.[1]  But before submitting a patch,\nI'd like to hear what others think.  Am I maybe missing some other\ninterpretation of \"remote branch\"?  Or is there already a term for \"a local\nbranch that tracks a remote branch\"?\n\n\t\tM.\n\n[1] I understand that strictly speaking, all branches are local, and a\n\"remote branch\" like 'origin/master' is in fact a local branch named 'master'\nin the 'origin' namespace, and that it's really the fetch refspecs in a\nremote's configuration that link updates in a remote repository to some local\nbranches, and there's no requirement that a remote named 'origin' be linked\nwith the local 'origin' ref namespace, and so on and so on.  I think these\ndetails are important, and should be documented somewhere.  But I also think\n\"remote branch\" is a good shorthand term to refer to all that.\n"},{"id":"193324","messageId":"7vr4tl7qu3.fsf@alter.siamese.dyndns.org","threadId":"30766","inReplyTo":"4FD6068D.1010509@xiplink.com","subject":"Re: \"remote-tracking branch\"?","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2012-06-11T16:31:32Z","receivedAt":"2012-06-11T16:31:32Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Marc Branchaud <marcnarc@xiplink.com> writes:\n\n> When I first read this I was confused by the term \"remote-tracking branch\".\n> I see that the docs for \"git remote\" and \"git branch\" use this term for\n> branches like 'origin/master', as does the glossary.\n> ...\n> I feel my interpretation is reinforced by the --track/--no-track options in\n> \"git branch\".\n\nThey were added long after \"remote tracking branch\" terminology has\nbeen established to mean the copies of last observed values of refs\nat remotes, and back then nobody noticed that these misnamed options\nwere potential sources of this kind of confusion.  If anything,\nthese options need to be renamed if you want to avoid confusion.\n\nUnfortunately, no concensus terminology for them exist; I find\nmyself calling them \"the branch you integrate with upstream's\nmaster\", \"the branch you forked from origin's topic\", etc.\n"},{"id":"193326","messageId":"7vipex7q5t.fsf@alter.siamese.dyndns.org","threadId":"30766","inReplyTo":"7vr4tl7qu3.fsf@alter.siamese.dyndns.org","subject":"Re: \"remote-tracking branch\"?","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2012-06-11T16:46:06Z","receivedAt":"2012-06-11T16:46:06Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Junio C Hamano <gitster@pobox.com> writes:\n\n> Unfortunately, no concensus terminology for them exist; I find\n> myself calling them \"the branch you integrate with upstream's\n> master\", \"the branch you forked from origin's topic\", etc.\n\nActually, I take that \"no concensus exists\" back.  \"upstream\" is\nprobably the closest to the consensus terminology, and that is why\n\"git log master@{upstream}\" will give you the history of the remote\ntracking branch you use to integrate with master.\n"}]}