W3C home > Mailing lists > Public > public-webauthn@w3.org > March 2019

Re: [webauthn] Git merge variants (#1183)

From: Emil Lundberg via GitHub <sysbot+gh@w3.org>
Date: Wed, 13 Mar 2019 16:57:32 +0000
To: public-webauthn@w3.org
Message-ID: <issue_comment.created-472512094-1552496251-sysbot+gh@w3.org>
Yes, that means replacing the original commits with new ones (or just one, in the case of squash). Merging with the "Create a merge commit" variant of the merge button, you get:

```
* fffffff Merge branch 'feature2' into master (master)
|\
* \ eeeeeee Merge branch 'feature1' into master
|\ \
| | * ddddddd Add feature 2 (feature2)
| | * ccccccc WIP: feature 2
| * | bbbbbbb Add feature 1 (feature1)
|/ /
|/
* aaaaaaa Initial commit
```

where commit `fffffff` has both `bbbbbbb` and `ddddddd` as ancestors. In this case, `git branch --merged master` will tell you that both the `feature1` and `feature2` branches are merged into `master` and can safely be deleted.

Merging with the "Squash and merge" variant, you get:

```
* d0d0d0d Add feature 2 (master)
* b0b0b0b Add feature 1
| * ddddddd Add feature 2 (feature2)
| * ccccccc WIP: feature 2
|/
| * bbbbbbb Add feature 1 (feature1)
|/
* aaaaaaa Initial commit
```

where the original commits `bbbbbbb`, `ccccccc` and `ddddddd` have been replaced with the new commits `b0b0b0b` and `d0d0d0d`. The history on master is a bit tidier, but `git branch --merged master` doesn't know that the branches have been merged, because the commits on master are different commits than those in the branches. "Rebase and merge" is the same except there will be two new commits on master from the `feature2` branch instead of them being squashed into one.

-- 
GitHub Notification of comment by emlun
Please view or discuss this issue at https://github.com/w3c/webauthn/issues/1183#issuecomment-472512094 using your GitHub account
Received on Wednesday, 13 March 2019 16:57:33 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 18:59:02 UTC