How to reverse change from some specific commit in sourcetree

Hi All,

I'm a newer for sourcetree. Here I have a question about How to reverse change from some specific commit in sourcetree;

I'm using sourcetree version I can only fine "reverse file" command on the top right of the file. What I'm aiming for is the reverse hunk and reverse line button. I've seen these two button before, but I cannot find it now.




4 answers

Not sure why you tagged this question as "bitbucket" when you are clearly asking about SourceTree features. I changed the tags, but any users who subscribed to the SourceTree tag probably didn't see your question.

In the Log view, if you click on a commit, and then a particular file in that commit, it will show the diff of the file in the bottom right pane.

Each hunk should have a "reverse hunk" button. If you select any modified lines in the hunk (click and shift+click) you should be given the option to reverse lines.

Thanks Seth I followed your instructions. Could you please check my solution in the next comments (as I cannot attach picture in this comments) if I did things correctly.

Hi Seth, I updated sourcetree with Version, and now it works





Hi Seth,

I selected the uncommitted changes and the previous commit, and select the file I want to reverse in Log view. As can be seen from the right panel, there only be reverse file option available.



image2015-8-20 10:9:42.png

image2015-8-20 10:9:59.png

Don't select both commits, only select the commit that has changes you want to reverse.

thanks Seth. It should be tag with sourcetree.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Oct 23, 2018 in Sourcetree

Tip from the team: configure your repos for hosting goodness!

Supported Platforms macOS Windows We recently introduced support for additional hosting services such as GitHub Enterprise, GitLab (Cloud, Community Edition, Enterprise Edition), and...

1,222 views 4 2
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you