If you want to fetch a branch on GitHub to the local machine, directly enter the following command:
Git checkout origin/
Result error:
Error: pathspec 'origin/feature_renrendai_tongji 'did not match any file (s) known to git.
See http://stackoverflow.com/questions/5989592/git-cannot-checkout-branch-error-pathspec-did-not-match-any-files-kn,
The following methods are available:
Execute git fetch to retrieve new information from GitHub and store it in a local repository. For example, the Branch I want to fetch does not have this information locally, execute git branch-A and find that there is no branch. After git fetch is executed,
Then execute
Git checkout-B A origin/
The remote a is retrieved and switched to the local a branch.
However, it seems that the following command can retrieve the information on the server, create branch a, and retrieve branch a on the server:
Git checkout-T-B A origin/