首页 > 解决方案 > Github PR 从特性/分支到开发和 PR 从开发到主分支,使用 Squash 和 Merge

问题描述

我们有分支机构

feature/branch-->develop-->master

以下是我遵循的步骤

1. Created a `feature/branch` from the origin which is a `develop` branch 
2. Committed on `feature/branch` and `git rebase origin/develop` and push it to remote `feature/branch`
3. Raised a PR from `feature/branch` to `develop` branch 
4. Performed `Squash and Merge` above step 3
5. Raised a PR from `develop` branch to `master` branch 
6. Performed `Squash and Merge` above step 5

问题: 我只看到一个提交,并且只在步骤 3 中更改了我的文件,但是当我从develop --> master分支提出 PR 时,它显示以前的提交而不是我的提交

如何解决此类问题并避免在每个 Pull 请求中出现此类问题?需要采取什么步骤,以使每个人的功能/分支的 PR 都没有此类问题

目前为了避免此类问题是暂时的,我们正在关注merge每个 Pull Request 的 PR。但我想避免它有一个干净的提交历史并且没有太多的提交历史

标签: gitgithubpull-request

解决方案


推荐阅读