From: Brian Gernhardt Date: Tue, 28 Sep 2010 20:01:19 GMT Subject: Re: Qn about git pull and git fetch Message-ID: <074C8233-BDFE-43AE-AF0A-2D510BF6F5DF@gernhardtsoftware.com> In-Reply-To: <4CA2473B.2040600@nextest.com> On Sep 28, 2010, at 3:51 PM, Eric Raible wrote: > On 11:59 AM, Brian Gernhardt wrote: >> > >> Your branches should be set to track automatically but if they didn't for >> some reason and are using v1.7.0 or newer, you can: >> >> $ git branch --set-upstream master origin/next >> Branch master set up to track remote branch next from origin. >> $ git pull >> >> If you're using git prior to v1.7.0, you can instead: >> >> $ git config branch.master.remote origin >> $ git config branch.master.merge refs/heads/master >> $ git pull > > Seems to me that to be equivalent, the first should be: > > git branch --set-upstream master origin/master > > or the second should be: > > git config branch.master.merge refs/heads/next > > Eh? Oops. I had forgotten to change the first one after some experimenting on the git.git repo. I had meant $ git branch --set-upstream master origin/master Far more repos have a master branch than a next one. ~~ Brian