[英]After github "merge pull request " action, all commits from the feature branch and a new merge commit appearing on the develop branch
Develop branch looks like开发分支看起来像
Develop
|- Commit 1
Create feature branch off develop git checkout -b feature origin/develop创建功能分支开发 git checkout -b 功能起源/开发
Feature
|- Commit 1
|- Commit 2 (New commit)
|- Commit 3 (New Commit)
After that created a PR with two commits.之后创建了一个带有两次提交的 PR。 Use a GitHub Merge pull request button to merge After merging the commit history of Develop looks like
使用 GitHub Merge pull request 按钮合并 Develop 的提交历史合并后的样子
Develop
|- Commit 1
|- Commit 2
|- Commit 3
|- Merged pull request #1 from user/branch/name
Any reason why commit 2 & 3 appearing in the history of Develop提交 2 和 3 出现在 Develop 历史中的任何原因
The merge commit is created to show you what was added to the current branch from other branches.创建合并提交是为了向您显示从其他分支添加到当前分支的内容。
If you enable graph display feature, then the merge commit will make more sense since it will show you that it "combined" (merged) two paths: commit 1 and commits 2-3.如果您启用图形显示功能,那么合并提交将更有意义,因为它会向您显示它“组合”(合并)了两条路径:提交 1 和提交 2-3。
Like this:像这样:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.