从Develop分支到Master分支的Github Pull Request显示了以前的提交.如何避免此类问题? [英] Github Pull Request from Develop branch to Master branch shows previous commits .How can I avoid such issues?

查看:152
本文介绍了从Develop分支到Master分支的Github Pull Request显示了以前的提交.如何避免此类问题?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有分支,例如:feature/branchdevelopmaster

We have branches like: feature/branch, develop and master

当我从feature/branchdevelop创建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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆