# How to Delete a Commit in Sourcetree

> To delete a commit in Sourcetree, open your repository, navigate to the History view, right-click the latest commit, select Reverse commit, and then confirm by clicking Yes to successfully reverse the commit.

Canonical: https://livedemo.ai/tutorials/how-to-delete-a-commit-in-sourcetree/
Apps: Sourcetree
Updated: 2026-10-05
Interactive demo: https://story-api.livedemo.ai/workspaces/62255d3d3304f17b8f5e2d03/stories/692a3aefab56e05a00fe2126/preview?step=1

## Steps

1. Open your repository in Sourcetree.
2. Go to the 'History' view.
3. Right-click the latest commit and click 'Reverse commit'.
4. Click 'Yes' to reverse the commit.
