Search code examples
atlassian-sourcetree

SourceTree, View history of deleted file. Do not know when was edited


I'm trying to view the edit history of a file that has been deleted.

SourceTree says to find the file in an old commit and then right-click it. The problem is that each version only lists the files that were edited for that version.

Do I really have to click down through hundreds of commits, trying to find an old version where I made an edit to this particular file?


Solution

  • I knew the name of the file so this worked for me:

    • Create a new file with that same name.
    • Do a commit.
    • I now have the file in my latest commit version. Something to right-click!

    I then used the usual method to view the history.

    • Right-click the file in my latest commit
    • Choose Log Selected
    • History opens in a new window. You will still be in the old window so look for the window in your taskbar.