合并开发分支的修改代码到release分支

  • 切换到开发分支:

    git checkout 13437-yg

  • git log 查看提交的commit id:

    d79723e84d0ee4206bc51e8ec6bda73ed55ef933

    7ecbfa37daa23da770fb3e7af52ec13a42ab7244

  • 切换到release分支:

    git checkout release

    注意:如果本地没有release分支,则拉取远程release分支:

    git checkout -b release origin/release

  • 基于release分支创建待合并的分支13437-yg-release:

    git checkout -b 13437-yg-release

  • 切换到合并分支13437-yg-release:

    git checkout 13437-yg-release

  • 在合并分支13437-yg-release中合并开发分支13437-yg提交的commit id: 执行 cherry-pick commit_id(开发分支13437-yg的某一次提交)命令:

    git cherry-pick d79723e84d0ee4206bc51e8ec6bda73ed55ef933

    git cherry-pick 7ecbfa37daa23da770fb3e7af52ec13a42ab7244

  • 一次合并多个commit:

    git cherry-pick …

    git cherry-pick d79723e84d0ee4206bc51e8ec6bda73ed55ef933 7ecbfa37daa23da770fb3e7af52ec13a42ab7244

  • 将合并分支13437-yg-release推送到远程仓库:

    git push origin 13437-yg-release

    如果远程仓库没有该分支13437-yg-release,会自动创建分支13437-yg-release

  • 在git仓库管理平台中申请合并分支13437-yg-release 到 release 分支

你可能感兴趣的:(git,git)