Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Revert equivalent in SourceTree

Carlos Durán
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 14, 2025

 

I need to perform the equivalent of the following Git command in SourceTree:

`git revert -m 1 <commithash>`

This command reverts a merge commit while keeping changes from one parent branch and discarding changes from the other.

I would like to know if there is a way to achieve this functionality directly through SourceTree's graphical user interface.
Thank you for your assistance. Best regards,
Carlos Durán

1 answer

0 votes
Brant Schroeder
Community Champion
August 8, 2025

@Carlos Durán welcome to the Atlassian community

 

You can commit a reverse commit by right clicking on a commit and selecting Reverse commit. This will effectively create a new commit that negates the changes you made in your selected commit. The commit with the changes you negated will still exist.

You can checkout an earlier commit by doubleclicking on an earlier commit or rightclicking and selecting checkout. This will change your code to the state it was for your selected commit, so without the changes from later commits. The commit with the changes you negated will still exist.

You can reset to an earlier commit. This will remove the commit with the changes you want to negate. (They can normally still be recovered using the reflog

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events