从Develop分支到Master分支的Github Pull Request显示了以前的提交.如何避免此类问题? [英] Github Pull Request from Develop branch to Master branch shows previous commits .How can I avoid such issues?
问题描述
我们有分支,例如:feature/branch
,develop
和master
We have branches like: feature/branch
, develop
and master
当我从feature/branch
到develop
创建PR时,我只看到一次提交,并且只更改了feature/branch
中我的文件,这很好并且已经合并到develop
分支
When I have created a PR from feature/branch
to develop
, I see only one commit and only changes to my files in the feature/branch
which is good and have merged into develop
branch
然后出于某种原因,当我从develop
-> master
创建PR时.即使我在develop
Then for some reason when I have created a PR from develop
--> master
. It shows a whole list of previous commits and changes even if I've made only a single line change in develop
我该如何解决此类问题,并避免在每个Pull请求中出现这种情况
How do I resolve such issues and avoid having such in every Pull request
推荐答案
我通过避免在GitHub中使用Squash and Merge
避免了此类问题.并使用git pull --rebase origin
I have avoided such issues by avoiding Squash and Merge
in the GitHub. And Have rebased the feature branch with git pull --rebase origin
这篇关于从Develop分支到Master分支的Github Pull Request显示了以前的提交.如何避免此类问题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!