A while back in a known branch i committed a file, which was subsequently removed. Many iterations later, i’d like to recover this file.
How can this be done please?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you remember the file name, you can just run
git log -- <filename>to show all commits that involved that file. If you don’t remember the file name, but remember something about the contents, you can usegit log -S <string>orgit log -G <regex>to search for it.