Pathspec upstream / master is mixed

I can click, pull and check upstream / master without problems, but I get a warning. Upstream / master is designed to track changes made to the source code from which I forked (following github instructions).

eg.

$ git checkout upstream/master
warning: refname upstream/master is ambiguous

$ git branch -a
* master
  upstream/master
  remotes/origin/HEAD -> origin/master
  remotes/origin/master
  remotes/upstream/master

This command also has an ambiguous error:

$ git branch
* master
  upstream/master

$ git checkout upstream/master filename.bar
+3
source share
1 answer

This page mentions the usual reason for this message:

When you try to check the local branch, you get

warning: refname 'branch-name' is ambiguous

This can happen if you create a local branch with the same name as the remote tag .
Git should check your local branch, but instead, it tries to check the tag, and it gets confused.

, , ( ) .

+2

All Articles