程序员社区

Git 基于主线分支创建一个新的分支并拉取代码

主线分支:feature-sir-fengbaichao

基于主线分支创建的分支:feature-notification-ghh

① 切换到主线分支:

git checkout feature-sir-fengbaichao

② 拉取主线分支最新的代码:

git pull --rebase

③ 创建新分支并切换到该分支:

git checkout -b feature-notification-ghh

④ 推送新分支到远程仓库:

git push origin feature-notification-ghh -f

⑤ 关联远程仓库

git branch --set-upstream-to=origin/feature-notification-ghh

⑥ 尝试拉取验证:

git pull --rebase

赞(0) 打赏
未经允许不得转载:IDEA激活码 » Git 基于主线分支创建一个新的分支并拉取代码

相关推荐

  • 暂无文章

一个分享Java & Python知识的社区