git拉取远程分支到本地

  • 新建本地分支
1
git checkout -b localName

pull远程代码

1
git pull origin remoteName
  • fetch
1
git fetch origin branchname:branchname
  • 获取远程分支remoteName 到本地新分支localName,并跳到localName分支
1
git checkout origin/remoteName -b localName