When merging pull requests into the core ROS 2 repositories (those in ros2/ros2.repos at rolling · ros2/ros2 · GitHub), we’ve always used either “Squash and merge” commits or “Rebase and merge” commits. That allows us to keep a linear history, while somewhat obscuring the actual development of the pull request in question. With increasing numbers of maintainers on the core repositories, we are now seeing more PRs merged with “Create a merge commit”.
The point of this post is not to debate the merits of “Squash/Rebase” vs. “Merge” commits in the core. For now, our best practice for core repositories is to use “Squash/Rebase” commits as documented (if you’d like to discuss this practice, we can have a separate discussion).
In order to enforce that, we are considering disabling the “Merge” commit button on the core repositories completely. That means that “Squash and merge” and “Rebase and merge” would be the only option available for merging PRs. If this is going to significantly impact your workflow somehow, please let us know. Otherwise, we’ll be slowly making this change throughout the core repositories.