In git how is it that PR with lagging branch compared to master just show the files in feature branch even though feature did not have the latest pull
在git中,与master相比,具有滞后分支的PR如何只显示功能分支中的文件,即使功能没有最新的pull
When I first read about merge it was either FF or Merge commit. Merge commit creates a non linear branch(correct me if wrong), Now if my feature branch is behind in commits as compared to master, how is it not creating merge commit but just files unique to my feature are coming.
当我第一次读到关于合并的文章时,它要么是FF,要么是merge提交。合并提交创建了一个非线性分支(如果错误,请纠正我),现在,如果我的功能分支与主分支相比在提交中落后,它怎么不是创建合并提交,而是创建我的功能特有的文件。
更多回答
Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking.
请澄清您的具体问题或提供更多详细信息,以突出您的需求。正如目前所写的,很难准确说出你在问什么。
优秀答案推荐
If you do not want to create a merge commit, your feature branch needs to be rebased. Most of the forges (gitlab, github, gitea, ...) have a feature to do that automatically from a pull request web page.
如果您不想创建合并提交,则需要重新确定功能分支的基础。大多数伪造品(gitlab、github、gitea…)都有一个功能,可以从拉取请求网页自动完成。
This is a feature of the forge though, not of plain git.
不过,这是锻造厂的一个特点,而不是普通的git。
更多回答
Thanks @Simon Richter. I was wondering why is it working, Now I understand that Azure Repos is rebasing from the website itself when I create the PR
谢谢@Simon Richter。我想知道为什么它能起作用,现在我知道Azure Repos在我创建PR时从网站本身重新调整基础
我是一名优秀的程序员,十分优秀!