使用 GitHub 网站进行 PR 的非快进合并,而不是 Git CLI

Using GitHub website for non-fast-forward merging of PRs, instead of Git CLI

我想知道是否有等效于执行以下操作 进行非快进合并到当前分支以保留我的分支拓扑:

git merge --no-ff <some-branch>

...不使用 git CLI 或桌面应用程序,仅在 GitHub 网络界面中?

如何为在 Web 界面上创建的 PR 执行此操作?

如有任何指点或说明,我们将不胜感激。

你可以只使用 Github 合并请求来做这件事!如果你没有更改配置,它默认使用 --no-ff

以下文字来自Github docs:

When you click the default Merge pull request option on a pull request on GitHub, all commits from the feature branch are added to the base branch in a merge commit. The pull request is merged using the --no-ff option.

如果您想始终将分支与 --no-ff 合并,您可以在您的回购设置中禁用其他合并方法(压缩和变基)。请参阅 this docs about squashing merge 并对其进行配置。