Skip to content

Draft: Update index.md to reflect that Merge commit has 2 ancestors

Artur Salii requested to merge asalii-master-patch-68768 into master

What does this MR do and why?

Update index.md to reflect the fact that Merge commit has 2 parents (commit on target branch + squash commit from source branch)

According to my tests, the graph should rather look like the following:

Screenshot 2023-07-07 at 11.19.33.png

Here is the output from my Git Log:

Artur@MacBook-Artur-2 mr-commit-tests % git log
commit c5c5db45d334db9c9d3e479c31726eee6e482515 (HEAD -> main, origin/main, origin/HEAD)
Merge: b849a13 f1bde0b
Author: Artur Salii <asalii@gitlab.com>
Date:   Fri Jul 7 07:58:23 2023 +0000

    merge commit is here!

commit f1bde0b7949f772bf6a04faeecc6fdfe80c473a7
Author: Artur Salii <asalii@gitlab.com>
Date:   Fri Jul 7 07:58:22 2023 +0000

    squash commit is here!

commit b849a133a668482ca1f871aa1c71be736221a214
Author: Artur Salii <asalii@gitlab.com>
Date:   Fri Jul 7 07:53:15 2023 +0000

    commit_2_br_main

commit c39789853c2d11c78a61e130a9622a0fadc8603c
Author: Artur Salii <asalii@gitlab.com>
Date:   Fri Jul 7 07:52:40 2023 +0000

    commit_1_br_main

commit b8890ed2bd3d972fc4472a723488ec3de05e7fdd
Author: Artur Salii <asalii@gitlab.com>
Date:   Fri Jul 7 07:51:56 2023 +0000

    Initial commit
Artur@MacBook-Artur-2 mr-commit-tests % git log --first-parent
commit c5c5db45d334db9c9d3e479c31726eee6e482515 (HEAD -> main, origin/main, origin/HEAD)
Merge: b849a13 f1bde0b
Author: Artur Salii <asalii@gitlab.com>
Date:   Fri Jul 7 07:58:23 2023 +0000

    merge commit is here!

commit b849a133a668482ca1f871aa1c71be736221a214
Author: Artur Salii <asalii@gitlab.com>
Date:   Fri Jul 7 07:53:15 2023 +0000

    commit_2_br_main

commit c39789853c2d11c78a61e130a9622a0fadc8603c
Author: Artur Salii <asalii@gitlab.com>
Date:   Fri Jul 7 07:52:40 2023 +0000

    commit_1_br_main

commit b8890ed2bd3d972fc4472a723488ec3de05e7fdd
Author: Artur Salii <asalii@gitlab.com>
Date:   Fri Jul 7 07:51:56 2023 +0000

    Initial commit

Note the Merge: b849a13 f1bde0b containing 2 hashes.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Artur Salii

Merge request reports

Loading