From: Avery Pennarun Date: Thu, 14 May 2009 05:29:49 GMT Subject: Re: how to update origin/ after a push to origin ? Message-ID: <32541b130905132229nf873a39m4b7c93e3bac0f39c@mail.gmail.com> In-Reply-To: <20329.1242278469@relay.known.net> On Thu, May 14, 2009 at 1:21 AM, layer wrote: > Avery Pennarun wrote: >>> Short answer: >>> >>>    git fetch origin > > I wasn't doing exactly this, but I was doing the equivalent of > >  git fetch $(git config --get remote.origin.url) > > Why would these be different? If you fetch only based on URL, then git doesn't know the name of that url is 'origin', and thus can't possibly know that it's supposed to replace origin/master. BTW, the reason 'git fetch origin master' doesn't work is completely unrelated: in *that* case, that syntax means you want to fetch the branch named master, but you're going to do something specific to it, so it ends up being stored as FETCH_HEAD instead. Generally you don't want to use that syntax. Avery