SaltfishTry for free

How to Allow Merge Commits for Pull Requests in GitHub

·2 min read
In this article

Merge commits combine the history of a feature branch into the base branch, preserving the full development history. Enabling this option in GitHub allows you to use merge commits when integrating pull requests.

Explore more GitHub tutorials with interactive Saltfish walkthroughs.

Here's how to allow merge commits for pull requests in GitHub

  1. Navigate to Repository Settings

    From your GitHub dashboard, select the repository you wish to configure. Once inside the repository, locate and click the 'Settings' tab in the top navigation bar to access its configuration options.

  2. Access General Settings

    On the repository settings page, look for the left sidebar. Click on 'General' to view the general settings for your repository, which include various core configurations.

  3. Locate Pull Requests Section

    Scroll down the General settings page until you find the 'Pull Requests' section. This section contains options related to how pull requests are handled and merged within your repository.

  4. Enable Merge Commits

    Within the 'Pull Requests' section, locate the 'Allow merge commits' option. Check the corresponding checkbox to enable merge commits for pull requests in this repository.

  5. Configure Default Merge Message (Optional)

    After enabling merge commits, you can optionally configure the default message format. Click the 'Default message' dropdown and choose how GitHub should format the merge commit message.

Your turn to show how it works.

Build a walkthrough of your product with Saltfish, then share it with your customers.

Create a guide with Saltfish

Frequently Asked Questions

First, navigate to your repository from the GitHub dashboard. Then, click on the 'Settings' tab located in the top navigation menu of your repository page.