1. 查看远程仓库所有分支
git fetch
git branch -r
2. 追踪远程分支
假设要追踪远程的origin/feature-branch
· 创建本地分支并追踪远程分支
git checkout -b feature-branch origin/feature-branch
· 或者,在一个已经存在的本地分支内设置追踪
git branch --set-upstream-to=origin/feature-branch
3. 拉取最新代码
git pull
标签:origin,git,feature,拉取,branch,远程,分支
From: https://blog.csdn.net/zyckk4/article/details/141812400