Disclaimer: This article is a blogger sigmarising original article, shall not be reproduced without the bloggers allowed. https://blog.csdn.net/sigmarising/article/details/88877363
Git pull remote branch && create a local branch
Method 1:
git checkout -b 本地分支x origin/远程分支y
This new command x in the local branch, and branch switching to x.
X using this method to establish a local branch of the will and remote branch y establish the mapping.
Method 2:
git fetch origin 远程分支y:本地分支x
This new command in the local branch x, but does not automatically switch to the branch, it is necessary to manually switch.
The use of this method to establish a local branch of x will not and remote branch y establish the mapping.