Reputation: 272254
I committed 2 days ago. Then, I made changes to some of the files.
However, inside one specific directory, I didn't make any changes to it recently.
Today, I deleted those files using rm * inside that directory.
How can I restore files to that directory using git?
Upvotes: 0
Views: 76
Reputation: 116407
Simply use this:
cd <specific_dir>
git checkout .
It will restore all files and directories in current directory which were tracked by git.
Be aware that this will overwrite uncommitted changes to other files in current directory.
Upvotes: 3