I have cloned a repo and added my fork as another remote but I cannot check out a branch for the first time (in this case master, which is not their default branch) without specifying which remote.
git clone https://github.com/facebook/zstd.git
cd zstd
git remote add jay https://github.com/jay/zstd.git
git fetch jay
git checkout master
error: pathspec 'master' did not match any file(s) known to git.
If I specify the remote it works:
git checkout -b master origin/master
Branch master set up to track remote branch master from origin.
Switched to a new branch 'master'
I'm curious why I need to specify the remote in this case. I must be remembering this wrong but I'm pretty sure that wasn't always necessary. This is true of any branch that's in both repos, for example, git checkout zstd_help would also fail the first time unless I explicitly specified origin remote.
Git version: git version 2.7.4