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 1.6.19.0. 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.

 

Cheers,

Youwei

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 1.6.20.0, 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.

Cheers,

Youwei

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 Join to answer
Community showcase
Brian Ganninger
Published Jan 23, 2018 in Sourcetree

Tip from the team: workflow and keyboard shortcuts

Supported Platforms macOS Sourcetree has a lot to offer and, like many developer tools, finding and using it all can be a challenge, especially for a new user. Everyone might not love ...

241 views 0 3
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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot