Re: how to update origin/<branch> after a push to origin <branch>?
- From
Avery Pennarun <apenwarr@gmail.com>
- Date
- May 14, 2009, 05:29 UTC
- Message-ID
- <32541b130905132229nf873a39m4b7c93e3bac0f39c@mail.gmail.com>
- In-Reply-To
- <20329.1242278469@relay.known.net>
On Thu, May 14, 2009 at 1:21 AM, layer <layer@known.net> wrote:
Show 10 quoted lines
> Avery Pennarun <apenwarr@gmail.com> 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