Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How to reverse change from some specific commit in sourcetree

YOUWEI QIN August 19, 2015

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

3 votes
Seth
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 19, 2015

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.

YOUWEI QIN August 19, 2015

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.

YOUWEI QIN August 20, 2015

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

0 votes
YOUWEI QIN August 19, 2015

thanks Seth. It should be tag with sourcetree.

0 votes
YOUWEI QIN August 19, 2015

 

 

 

 

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

Seth
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 20, 2015

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

0 votes
Seth
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 19, 2015

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.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events