To revert a commit in Sourcetree, follow these steps:
- Open Sourcetree and load your repository.
- Go to the 'History' tab.
- Right-click the commit you want to revert and select ‘Reverse commit'.
- In the popup, confirm by clicking 'Yes'.
- Following these steps creates a new commit that undoes the changes of the selected commit.