0

I have missed one file locally but I can recall I commit and push that file before into the repository.

Can anyone help to get/search that commit base on my file name, so do I can go and get that file again.

Antonio Petricca
  • 8,891
  • 5
  • 36
  • 74
Indrajeet Gour
  • 4,020
  • 5
  • 43
  • 70

1 Answers1

0

Try with the following instruction:

git log --all --full-history --oneline -- {{YOUR_FILE_NAME}} **/{{YOUR_FILE_NAME}}

So you can find the file name in the project history if it were on the root folder, or in any subfolder.

Please tell me if that works for you.

Antonio Petricca
  • 8,891
  • 5
  • 36
  • 74