First: apologies for the question title, I don't actually know what the problem is so I don't know how to ask about it.
I want to diff my master with upstream master (should be origin/master, based on the way my remotes are set up).
But: origin was put there after I had been working on it locally for a while, so it's "origin" in name only. That is: I had a local repo, put it up into a gitolite setup, and then told my local git to call it origin.
These are the symptoms:
$ git diff master orgin/master fatal: ambiguous argument 'orgin/master': unknown revision or path not in the working tree. $ git diff master origin/master -- fatal: bad revision 'origin/master' Hm.
$ git remote -v origin [email protected]:example (fetch) origin [email protected]:example (push) okay, that looks right.
$ git branch -a ... # nothing from origin Hm.
$ git fetch -a origin From example.com:example * branch HEAD -> FETCH_HEAD I have no idea if that's correct. It looks productive, but git diff master origin/master still fails, and:
$ git branch --track omaster origin/master fatal: Not a valid object name: 'origin/master'. Wha?
$ ls .git/refs/remotes gitps ps That looks wrong: those are old remotes that haven't existed for months. Also they're empty. And .git/remotes doesn't exist at all, although I'm not sure that it should.