0

A few days ago I had the need to recover a file deleted in a prior commit and was unable to find a way to do it. Anyone able to suggest how? Also any of the nice gui git tools provides OOB this capability?

1

1 Answer 1

2

You can checkout the file from the previous revision from where you deleted it. So, say the revision where it was deleted is rev some-rev:

git checkout some-rev~:path-to-file

That will leave the file on index ready to be committed.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.