git 同步非master分支

时间:2023-03-10 03:43:31
git 同步非master分支
  • 在本地创建和远程分支对应的分支,使用git checkout -b branch-name origin/branch-name,本地和远程分支的名称最好一致;

  • 建立本地分支和远程分支的关联,使用git branch --set-upstream branch-name origin/branch-name

  • 从远程抓取分支,使用git pull,如果有冲突,要先处理冲突。

  • git remote -v

    And make sure origin is fetched:

    git fetch origin