{"thread":{"id":"26778","subject":"Question about \"branch.<name>.merge\"","startedAt":"2011-03-18T19:35:15Z","lastAt":"2011-03-18T21:13:09Z","messageCount":2,"participants":["Josh Ralburton","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"163664","messageId":"AANLkTin-96TK_8MjAM7MB4CCyZ0ZSvD=ZanaYWLiXsvC@mail.gmail.com","threadId":"26778","inReplyTo":null,"subject":"Question about \"branch.<name>.merge\"","fromName":"Josh Ralburton","fromEmail":"josh.ralburton@gmail.com","sentAt":"2011-03-18T19:35:15Z","receivedAt":"2011-03-18T19:35:15Z","isPatch":false,"sender":{"key":"josh.ralburton@gmail.com","avatar":null},"body":"This is a typical section from a .git config file:\n\n[remote \"origin\"]\n    fetch = +refs/heads/*:refs/remotes/origin/*\n    url = git://git.kernel.org/pub/scm/git/git.git\n[branch \"master\"]\n    remote = origin\n    merge = refs/heads/master\n\nI am curious why \"branch.master.merge=refs/heads/master\"  was\nimplemented to refer to the remote branch (refs/heads/master) rather\nthan the local branch (refs/remotes/origin/master).\n\nThanks.\n\nJosh\n"},{"id":"163675","messageId":"7vei64w2sa.fsf@alter.siamese.dyndns.org","threadId":"26778","inReplyTo":"AANLkTin-96TK_8MjAM7MB4CCyZ0ZSvD=ZanaYWLiXsvC@mail.gmail.com","subject":"Re: Question about \"branch.<name>.merge\"","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2011-03-18T21:13:09Z","receivedAt":"2011-03-18T21:13:09Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Josh Ralburton <josh.ralburton@gmail.com> writes:\n\n> This is a typical section from a .git config file:\n>\n> [remote \"origin\"]\n>     fetch = +refs/heads/*:refs/remotes/origin/*\n>     url = git://git.kernel.org/pub/scm/git/git.git\n> [branch \"master\"]\n>     remote = origin\n>     merge = refs/heads/master\n>\n> I am curious why \"branch.master.merge=refs/heads/master\"  was\n> implemented to refer to the remote branch (refs/heads/master) rather\n> than the local branch (refs/remotes/origin/master).\n\nBecause conceptually you are merging with the refs/heads/master branch\nthat exists at the \"origin\" repository, not merging with a remote tracking\nbranch that the \"origin\" repository may have to track its upstream.\n\nIt is immaterial that you happen to have a copy of it at your own remote\ntracking branch (i.e. refs/remotes/origin/master).  If you don't need\ntracking branches, you can even do something like this:\n\n\t[remote \"origin\"]\n                url = git://...there\n        [branch \"master\"]\n\t\tremote = origin\n                merge = refs/heads/master\n\nNotice that you are telling git not to create any remote tracking branches\nwith this configuration.\n"}]}