Memo on how to restore deleted files from git commit logs.
% git rev-list -n 1 HEAD -- spam.js
53599a4616710108d8fd035cf3c303a036a3c59c
% git checkout 53599a4616710108d8fd035cf3c303a036a3c59c^ -- spam.js
The restored file is stored in the staging area.
The rest is as usual.
・gitで削除してしまったファイルの復元 - itochin2の日記(仮)
That’s all from the Gemba.