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

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

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
Community showcase
Published 2 hours ago 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...

16 views 0 1
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