Skip to Content

Merge Branches into Master Branch in GitHub using Pull Requests

Requires Customer/Partner License
Merge a feature branch back into the master branch in GitHub, and fetch the updates in SAP Web IDE.
You will learn
  • How to create and send pull requests so that the changes in branches will be merged into the master branch
SathyaBhatSathyaBhatDecember 19, 2020
Created by
SathyaBhat
June 29, 2016
Contributors
SathyaBhat

Prerequisites

  • IMPORTANT: This tutorial cannot be completed on a trial account
  • Step 1

    Open the Organization repository on GitHub and switch to the branch that you want to merge into master.

  • Step 2

    Click New Pull Request to create a pull request.

    Create pull request

    Enter brief details about the pull request and click Create pull request. You can scroll down and see a diff of the files that were changed as well as the commits.

    Open pull request
  • Step 3

    To accept the pull request, click the Pull Requests tab to see a summary of pending pull requests. If you are happy with the changes, click Merge Pull request to accept the pull request and perform the merge. You can add in a comment if you want.

    Merge pull request

    Once you click Merge Pull request, you will see a button Confirm merge. Click the drop-down next to the button so you can select a merge option: Squash merge creates a single commit from all changes, and Merge commit leaves all the commits as is.

    Confirm merge

    If the merge was successful, you’ll see a note about it and you can proceed with deleting the branch if required.

    Merge successful

    Issues are automatically closed as well and the milestone is complete.

    GitHub will automatically close an issue if your commit message includes certain keywords once this change is merged into the master branch.

    Milestone complete
  • Step 4

    Ensure your workspace in SAP Web IDE has fetched these latest changes.

    1. Open the Git pane and switch to the master branch.

      Switch to master
    2. Click Pull to pull in the changes. Enter your GitHub account credentials and press OK.

      Switch to master
    3. Open the Git History pane to see that the branching, changes and pull request were successful.

      Switch to master
Back to top