git创建新分支开发流程

296 阅读1分钟
  1. 从master分支copy一个开发分支

    $git checkout master $git pull

  2. 从当前分支拉copy开发分支

    $git checkout -b 新分支的名称 Switched to a new branch '新分支的名称'

  3. 把新建的分支push到远端

    $git push origin 新分支的名称

  4. 拉取远端分支

    $git pull

    There is no tracking information for the current branch. Please specify which branch you want to merge with. See git-pull(1) for details. git pull <remote> <branch> If you wish to set tracking information for this branch you can do so with: git branch --set-upstream-to=origin/<branch> 新分支的名称

  5. 关联

    $git branch --set-upstream-to=origin/新分支的名称

  6. 再次拉取 验证

    $git pull