eclipse - How to find and restore one single file from git? -
I have sometimes removed some files from the project under git control, after that I made many commitments the latest amendments in history (1) Find out where this file is and (2) only restore it?
To search for the command to delete the file:
git log --all - folder / other-folder / File_name.txt
or even just
git log --all - * / file_name.txt
just do this:
Git checkout (less hash) ^ - folder / other-folder / file_name Txt
^ It tells that it does not work to git, but the first one.
Comments
Post a Comment