Development Shack Technology Understood

git branch --set-up-stream-to ambiguous object name  

I was attempting to set the upstream branch on git and this happened:

$ git branch --set-upstream-to=origin/master
warning: refname 'origin/master' is ambiguous.
fatal: Ambiguous object name: 'origin/master'.

For some odd reason, I had a branch called "origin/master", so git wasn't sure if the upstream branch is another local branch or a remote branch.

$ git branch
* master
  origin/master

In order to fix this, I deleted the local branch called "origin/master":

$ git branch -d "origin/master"
Deleted branch origin/master (was e70042f).

$ git branch
* master

Then, I was able to set the upstream branch:

$ git branch --set-upstream-to=origin/master
Branch master set up to track remote branch master from origin.