Enhance 'merge a pull request'

Issue #6107 duplicate
Thomas Pasch
created an issue

I miss the following when merging a pull request:

  • an equivalent of 'git merge --squash' to merge the pull request as one commit without pulling in its development history
  • an option to modify the merge message ('git merge -m "..."')
  • an option to change the merge strategy and merge strategy options ('git merge -s ... -X ...')

Comments (37)

  1. Jonathan Mooring staff

    Thanks for your feedback, Thomas. Pull requests are not intended to be a full replacement for git merge, but rather a simplified interface for code review followed by quick and painless merges. If you require more control over the "how" of your merges, I would recommend that you perform the merge offline and push back to the remote afterwards.

    On a related note, we do actually prompt you for a commit message when merging a pull request, so that should at least help you out with one of your points. :)

  2. Lorn Potter

    code reviews often require several iterations of changes to be implemented before being approved. The lack of being able to combine or squash commits into one merge request is a feature severally lacking in bit bucket.

  3. Samuel Haddad

    @Kristofor Carle squashing beforehand may work for some, but at that point you might has well do the merge offline. The reason we push our branch to bitbucket is to use the built in review tool and perform a code review. In most cases the code review will require some changes. At which point it would be nice to squash merge the final feature.

  4. Richard Bair

    Agree, I was really hoping to have a way to collapse changesets from a forked repo into a single changeset to send to the master. We use mercurial, and there isn't a nice and convenient way to handle this manually (although there are ways) and I was hoping that Bitbucket would be able to handle this for me :-(

  5. Martin Geisler

    @Richard Bair It should be easy enough to squash changesets with either hg rebase --collapse or hg histedit.

    It would be cool if Bitbucket would support this on the server-side, though! That way I could push my commits for review and the commits could be rebased and collapsed then the feature is accepted. I'll then strip the old commits locally and be done.

  6. Anonymous

    I assume that they are no longer monitoring it due to the Closed - Wontfix status. They might not even get a notification about the new comments.

  7. Arne nl

    +1 Makes a ton of sense.

    During the lifetime of a feature branch, I frequently have to merge in changes from the master due to ongoing development in related components. Without squash commit, you this 'merge commit clutter'.

  8. Log in to comment