Skip to content

New GitHub Merging #6002

Description

@Fishrock123

GitHub has a new merge button feature, allowing it do a "squash-merge". See: https://github.com/blog/2141-squash-your-commits

I've done a little test [1], [2], and it appears to do what we want. No merge commit.

🎉 🎉 🎉 🎉 🎉 🎉 🎉 🎉

I have disabled the old-style merge button use on the core repo here already. We should double check and make sure this meets our merge standards before using the new option though.

@nodejs/collaborators

Activity

  1. added
    metaIssues and PRs related to the general management of the project.
    on Apr 1, 2016
  2. jasnell commented on Apr 1, 2016

    @jasnell
    Member

    First Microsoft does Bash and now this?! What is this future alternate
    universe I'm living in?!
    On Apr 1, 2016 12:41 PM, "Jeremiah Senkpiel" notifications@github.com
    wrote:

    GitHub has a new merge button feature, allowing it do a "squash-merge".
    See: https://github.com/blog/2141-squash-your-commits

    I've done a little test [1]
    TestOrgPleaseIgnore/-TEST-#2, [2]
    https://github.com/TestOrgPleaseIgnore/-TEST-/commits/master, and it
    appears to do what we want. No merge commit.

    [image: 🎉] [image: 🎉] [image: 🎉] [image: 🎉] [image:
    🎉] [image: 🎉] [image: 🎉] [image: 🎉]

    I have disabled the old-style merge button use on the core repo here
    already. We should double check and make sure this meets our merge
    standards before using though.

    @nodejs/collaborators https://github.com/orgs/nodejs/teams/collaborators

    —
    You are receiving this because you are on a team that was mentioned.
    Reply to this email directly or view it on GitHub
    #6002

  3. MylesBorins commented on Apr 1, 2016

    @MylesBorins
    Contributor

    @Fishrock123 when you do these merges do the commits end up rebased and at the top of the tree

  4. Fishrock123 commented on Apr 1, 2016

    @Fishrock123
    ContributorAuthor
  5. added a commit that references this issue on Apr 1, 2016
  6. Fishrock123 commented on Apr 1, 2016

    @Fishrock123
    ContributorAuthor

    @thealphanerd Yes, yes it does.

  7. MylesBorins commented on Apr 1, 2016

    @MylesBorins
    Contributor

    omg

  8. jasnell commented on Apr 1, 2016

    @jasnell
    Member

    It's definitely an improvement. I can imagine that if we enable this we'll have to keep a close eye on making sure that the commit metadata is still being added correctly to the commits. It also appears that this does not present the option of selecting which commits get squashed (we regularly end up with a few PRs whose commits should NOT be squashed on landing). This is certainly a step in the right direction but I'm not certain it's exactly what we need.

  9. jasnell commented on Apr 1, 2016

    @jasnell
    Member

    I will say, however, that turning off the merge commit option gets a huge hooray! from me.

  10. sam-github commented on Apr 1, 2016

    @sam-github
    Contributor

    That's sucky... they finally do what we want, almost then mess it up? It actually squashes, so your nice PR that carefully introduces a set of changes as incremental commits gets squashed into one.... and some devs crappy PR that is full of little commits with useless names also gets squashed into one with a bullet list of all the crappy commit messages? Just a tick box for "no merge commit for PRs" would have been handy, as a project wide setting. That it does an implicit rebase is pretty cool, though. But again, I wish I could make all PRs on my projects do the implicit rebase, AND leave the merge commit (not for node, of course).

  11. Fishrock123 commented on Apr 1, 2016

    @Fishrock123
    ContributorAuthor

    It will work for at least some portion of our commits by the looks of it.

    Notable exceptions being: PRs with more than one commit, and those we need to amend nits on.

    It'd be awesome of we could get a markdown template for the message box, but this is great incremental step.

  12. sam-github commented on Apr 1, 2016

    @sam-github
    Contributor

    It doesn't allow amending the commit metadata, Reviewed-By: ..., so it only works if you pre-prepare the branch to have a commit with that info. And if you are at the CLI because you just did that... why not just do an additional git merge; git push, @Fishrock123 ?

  13. jasnell commented on Apr 1, 2016

    @jasnell
    Member

    As @Fishrock123 says, it is at least a step in the right direction, just not sure how often we'd be able to use it.

  14. sam-github commented on Apr 1, 2016

    @sam-github
    Contributor

    Maybe its a step on a good path, possibly there will be no more steps after this. Though it is a sign that some devs are getting what they ask for, and that is good.

  15. Fishrock123 commented on Apr 1, 2016

    @Fishrock123
    ContributorAuthor

    @sam-github huh? what you fill into the merge box goes in the commit description and message, no?

  16. 2 remaining items

  17. Fishrock123 commented on Apr 1, 2016

    @Fishrock123
    ContributorAuthor

    @cjihrig I'd say go for it.

  18. cjihrig commented on Apr 1, 2016

    @cjihrig
    Contributor

    So, that worked fine. I had to force push over it, but that's only because I had a long line in the commit message (human error).

    Original: 0879dfe11ca0ea8ec8b4c26ad7775eaa66270330
    Force push: 39de601

  19. Fishrock123 commented on Apr 1, 2016

    @Fishrock123
    ContributorAuthor

    Hmmm, it has no way of checking that, does it?

    GitHub's desktop GUI checks the message length and auto-wraps the description.

  20. jasnell commented on Apr 1, 2016

    @jasnell
    Member

    Happy that it worked but definitely concerned that this will make it easier to overlook those kinds of errors. We'd have to make sure that all collaborators landing commits were disciplined in double checking the log.

  21. drgroot commented on Apr 1, 2016

    @drgroot

    Wouldn't squashing lead to loss of data?

  22. jasnell commented on Apr 1, 2016

    @jasnell
    Member

    @drgroot ... that depends on what gets squashed. We already as a common practice squash minor commits when landing PRs in order to keep the commit history fairly sane. However, quite often we will logically separate multiple commits in a single PR. It really depends on the individual PR. In this case, using the green button to squash ALL commits all the time is going to be problematic because it does not give us enough control.

  23. cjihrig commented on Apr 1, 2016

    @cjihrig
    Contributor

    Hmmm, it has no way of checking that, does it?

    @Fishrock123 that was my own stupidity. It was originally wrapped like I had it in my local editor. When it available for me to edit, it had extra lines between all of the lines. When I was removing the extra lines, I unwrapped that line.

  24. MylesBorins commented on Apr 1, 2016

    @MylesBorins
    Contributor

    So I just checked it myself on staging and it would appear that github is adding meta data to the top of the commit (the merge data)

    Merge pull request #5989 from npm/npm-2.15.1-node-4-revised

    edit:

    fd13148
    vs
    200f763

  25. Fishrock123 commented on Apr 1, 2016

    @Fishrock123
    ContributorAuthor

    @thealphanerd That hasn't happened to me?

  26. MylesBorins commented on Apr 1, 2016

    @MylesBorins
    Contributor

    I'll run a couple tests, I might have done something wrong. But it is a possible edge case to be aware of

  27. jbergstroem commented on Apr 5, 2016

    @jbergstroem
    Member

    So, where is this issue supposed to lead? Are we updating documentation to reflect that we would be ok with github-squashed commits?

  28. Fishrock123 commented on Apr 5, 2016

    @Fishrock123
    ContributorAuthor

    Hmm, I'm not sure. We unfortunately still need to prefer the old merging for many issues.

    @nodejs/ctc should we update the documentation to say this using the github button is ok under simple circumstances?

  29. cjihrig commented on Apr 5, 2016

    @cjihrig
    Contributor

    I'd say don't document it. If someone can use the button without anyone noticing, then more power to them. Otherwise, just stick to the directions.

  30. Fishrock123 commented on Apr 5, 2016

    @Fishrock123
    ContributorAuthor

    Yeah, I agree for now. Closing, can reopen if necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    metaIssues and PRs related to the general management of the project.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions