Roll Back Changes

Bitbucket

To revert a Bitbucket pull request after it’s been merged to the upstream branch:

  1. In Bitbucket, navigate to the repository you are using for version control.
  2. In the left sidebar, click Pull requests.
  3. In the pull requests list, select the pull request you desire to roll back.
  4. Click Revert.
  5. 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:

  1. In GitHub, navigate to the repository you are using for version control.
  2. Select the branch that you deployed from.
  3. Click the commit history link.
  4. In the commits list, select the pull request you desire to roll back.
  5. At the bottom of the pull request, click Revert.
  6. Select the revert branch that GitHub creates.
  7. Merge the new pull request GitHub creates into the repository branch that you originally deployed from. 
  8. Deploy the reverted changes from your repository branch to your Salesforce org. 
  9. 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.