Bitbucket
To revert a Bitbucket pull request after it’s been merged to the upstream branch:
- In Bitbucket, navigate to the repository you are using for version control.
- In the left sidebar, click Pull requests.
- In the pull requests list, select the pull request you desire to roll back.
- Click Revert.
- On the Create a pull request page opens with the revert branch as the source, click Create.
For more detailed information, refer to the Bitbucket topic on merging a pull request.
GitHub
To revert a GitHub pull request after it’s been merged to the upstream branch:
- In GitHub, navigate to the repository you are using for version control.
- Select the branch that you deployed from.
- Click the commit history link.
- In the commits list, select the pull request you desire to roll back.
- At the bottom of the pull request, click Revert.
- Select the revert branch that GitHub creates.
- Merge the new pull request GitHub creates into the repository branch that you originally deployed from.
- Deploy the reverted changes from your repository branch to your Salesforce org.
- Log in to the Salesforce org and verify that your changes are successfully rolled back.
For more information, refer to the GitHub help topics on reverting a pull request and merging a pull request.