简体   繁体   中英

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

Feature 
  |- Commit 1
  |- Commit 2  (New commit)
  |- Commit 3  (New Commit)

After that created a PR with two commits. Use a GitHub Merge pull request button to merge After merging the commit history of Develop looks like

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

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.

Like this:

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM