When I try to create a new branch tracking a remote branch, I get this:
$ git branch -t test origin/foo
error: Not tracking: ambiguous information for ref refs/r
None of the other fixes mentioned here worked for me. The one that ended up working was this:
$ git branch -t test origin/test
error: Not tracking: ambiguous information for ref refs/remotes/origin/test
After running the above, even though git complained, it did end up creating a local branch test
but no upstream set.
Now, I opened the .git/config
file (which did not have any record of a branch test
) and added the following manually:
[branch "test"]
remote = origin
merge = refs/heads/test
After which everything worked fine.