Skip to content

Instantly share code, notes, and snippets.

@stevetrask
stevetrask / sourcetree-reverse
Created July 20, 2015 18:28
Return the file to a previous state in sourcetree
If you want to return the file to a previous state, there are a number of ways to do this.
Option 1:
Right-click the file (in any view) and pick 'Log Selected'. This gives you a history just of that file.
Pick the commit in the list which represents the state at which you want the file to be returned to. So this would be the commit before the changes you wanted to reverse
Right-click this commit and select "Reset To Commit"
Note, you can also do this in the main log view (right-click the file in a commit and pick "Reset To Commit", but it's easier to find the commit you want when you use the file-specific log.