One, view remote branch
Use the following git command to view all remote branches:
Git branch-r
1
Two, pull remote branch and create local branch
Method One
Use the following command:
git checkout-b local branch name x origin/Remote branch name X
1
Using this method creates a new branch x locally and automatically switches to that local branch X.
The local branch established with this method establishes a mapping relationship with the remote branch. Mode two
Use the following command:
Git Fetch Origin Remote branch name x: local branch name X
1
Using this method creates a new branch x locally, but does not automatically switch to that local branch x, which requires manual checkout.
A local branch established using this method does not establish a mapping relationship with the remote branch. third, local branch and remote branch to establish the role of mapping relationship
See blog post git branch upstream