{"thread":{"id":"7270","subject":"git-pull can't be used without URL - Has worked before","startedAt":"2007-03-16T10:24:58Z","lastAt":"2007-03-16T22:48:42Z","messageCount":4,"participants":["Pelle Svensson","Paolo Bonzini","Matthias Lederhofer"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"37224","messageId":"6bb9c1030703160324u17d49b85s754ac8358f633bde@mail.gmail.com","threadId":"7270","inReplyTo":null,"subject":"git-pull can't be used without URL - Has worked before","fromName":"Pelle Svensson","fromEmail":"pelle2004@gmail.com","sentAt":"2007-03-16T10:24:58Z","receivedAt":"2007-03-16T10:24:58Z","isPatch":false,"sender":{"key":"pelle2004@gmail.com","avatar":null},"body":"Hi,\n\nDid a setup of a new git-kernel, but this time git-pull can't be used without\nfull URL. What should I do.\n\nSetup done this time\n=================\n[]$ git-clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git\n[]$ git-checkout -b my-brach v2.6.21-rc3;\n...\n[]$ git-pull\nWarning: No merge candidate found because value of config option\n              \"branch.my-project.merge\" dose not match any remote\nbranch fetched.\n\nTried with success\n==============\n[]$ git-pull git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git\n\nThen again\n=========\n[]$ git-pull\nWarning: No merge candidate found because value of config option\n              \"branch.my-project.merge\" dose not match any remote\nbranch fetched.\n\nI don't have .../.git/remotes directory in this setup??\n\n/Pelle\n"},{"id":"37229","messageId":"45FA84D1.2020903@lu.unisi.ch","threadId":"7270","inReplyTo":"6bb9c1030703160324u17d49b85s754ac8358f633bde@mail.gmail.com","subject":"Re: git-pull can't be used without URL - Has worked before","fromName":"Paolo Bonzini","fromEmail":"paolo.bonzini@lu.unisi.ch","sentAt":"2007-03-16T11:51:45Z","receivedAt":"2007-03-16T11:51:45Z","isPatch":false,"sender":{"key":"bonzini@gnu.org","avatar":"https://avatars.githubusercontent.com/u/42082?v=4"},"body":"\n> I don't have .../.git/remotes directory in this setup??\n\nFor v1.5.0, git-clone sets up a remote repository so that\nyou can look at what's going on remotely like this:\n\n  git log origin/next\n\nTo create your branch, you have to do something like\n\n  git-checkout -b my-branch origin/next\n  git-config add branch.my-branch.remote origin\n  git-config add branch.my-branch.merge refs/heads/next\n\nNote that the branch in the last command is the remote branch\nname not the local name.\n\n\nWith the current git \"master\" branch, you are able to do\nsomething like\n\n  git-checkout --track -b my-branch origin/next\n\nand git-pull (with no arguments) will automatically pull from\nwhatever branch you specified upon branch creation.  --track\nalso works with local branches, so you can have your topic\nbranches track the tip of your current development branch,\nfor example.\n\nPaolo\n"},{"id":"37230","messageId":"45FA84EF.3010103@lu.unisi.ch","threadId":"7270","inReplyTo":"6bb9c1030703160324u17d49b85s754ac8358f633bde@mail.gmail.com","subject":"Re: git-pull can't be used without URL - Has worked before","fromName":"Paolo Bonzini","fromEmail":"paolo.bonzini@lu.unisi.ch","sentAt":"2007-03-16T11:52:15Z","receivedAt":"2007-03-16T11:52:15Z","isPatch":false,"sender":{"key":"bonzini@gnu.org","avatar":"https://avatars.githubusercontent.com/u/42082?v=4"},"body":"\n> I don't have .../.git/remotes directory in this setup??\n\nFor v1.5.0, git-clone sets up a remote repository so that\nyou can look at what's going on remotely like this:\n\n  git log origin/next\n\nTo create your branch, you have to do something like\n\n  git-checkout -b my-branch origin/next\n  git-config add branch.my-branch.remote origin\n  git-config add branch.my-branch.merge refs/heads/next\n\nNote that the branch in the last command is the remote branch\nname not the local name.\n\n<shameless-advertisement-of-my-patches>\nWith the current git \"master\" branch, you are able to do\nsomething like\n\n  git-checkout --track -b my-branch origin/next\n\nand git-pull (with no arguments) will automatically pull from\nwhatever branch you specified upon branch creation.  --track\nalso works with local branches, so you can have your topic\nbranches track the tip of your current development branch,\nfor example.\n</shameless-advertisement-of-my-patches>\n\nPaolo\n"},{"id":"37282","messageId":"20070316224842.GA20775@moooo.ath.cx","threadId":"7270","inReplyTo":"6bb9c1030703160324u17d49b85s754ac8358f633bde@mail.gmail.com","subject":"Re: git-pull can't be used without URL - Has worked before","fromName":"Matthias Lederhofer","fromEmail":"matled@gmx.net","sentAt":"2007-03-16T22:48:42Z","receivedAt":"2007-03-16T22:48:42Z","isPatch":false,"sender":{"key":"matled@gmx.net","avatar":null},"body":"Pelle Svensson <pelle2004@gmail.com> wrote:\n> Did a setup of a new git-kernel, but this time git-pull can't be used \n> without\n> full URL. What should I do.\n\ngit pull [<remote>] uses the first branch of 'remote' if there is no\nspecial branch.name.{merge,remote} configuration.  But git clone will\nsetup remote.origin.fetch = +refs/heads/*:refs/remotes/origin/* which\nuses wildcards and isn't used as 'first branch'.  You can add another\nremote.origin.fetch line before this one in .git/config with\n\n    fetch = +refs/heads/master:refs/remotes/origin/master\n\nwhich worked for me.\n"}]}