Git合并分支后将子分支提交到Gitee码云

Git合并分支后,需要将子分支提交到git仓库,这个时候就需要单独提交子分支,其步骤如下:

  1. 先创建子分支,并包含最新当前分支下的修改数据
    git checkout -b sonBranch
  2. 将新分支内容全部提交
    git add .
    git commit -m "完成开发"
  3. 在码云创建一个子分支
    git push -u origin sonBranch
  4. 切换到主分支
    git checkout master
  5. 合并分支,更新主分支内容

    git merge sonBranch
  6. 重新提交主分支内容
    git push

    

猜你喜欢

转载自www.cnblogs.com/cqkjxxxx/p/12791313.html