Error: pathspec ‘origin / xxx’ did not match any file (s) known to GIT

There is a test branch on the project. You can’t see the remote branch by using Git Branch-A. You can directly use the command Git Checkout Test to report the error as follows:

error: pathspec 'origin/test' did not match any file(s) known to git.

Solution:
1. Execute git fetch to fetch updates of all branches
2. You can see the Test branch when executing Git Branch-A (the branch information has been updated).
3. Switch git Checkout Test

Read More: