how do i checkout previous version of text file in sourcetree?

jordan miller
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!
October 19, 2011

I have a plain text file, I want to open a version from a previous commit. How do I get SourceTree to do it's magic opening the previous version by putting it in /var/ and renaming it with the commit SHA1?

It will do this for binary files, but I can't figure out how to do this for text files.

Help!

1 answer

3 votes
stevestreeting
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.
October 19, 2011

You can checkout a file from a previous version by right-clicking on it in either the log view or the single-file log view and selecting 'Reset to this commit', but that will overwrite the version in your working directory.

To view the file *temporarily* without altering your working directory, just press Space (or right-click and select Quick Look) to quickly view any file using Quick Look - this even works on historical file state. If you then want to open the file in the native editor (still in the temporary area), click the 'Open with <app>' in the top-right of the Quick Look window, or double-click anywhere in the Quick Look window area.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events