git status
shows some files are deleted
deleted: uploads/cus/zixk19hldk1.jpg
deleted: uploads/cus/zixk19hldk1.jpg
Is there a way to recover those files
I tried git checkout .
but thats not working
git status
shows some files are deleted
deleted: uploads/cus/zixk19hldk1.jpg
deleted: uploads/cus/zixk19hldk1.jpg
Is there a way to recover those files
I tried git checkout .
but thats not working
The recent command git restore
is a new experimental command since Git 2.23.
git restore --source HEAD uploads/cus/zixk19hldk1.jpg
# shorter:
git restore -s @ uploads/cus/zixk19hldk1.jpg
You restore from HEAD (not from index).
With the old command:
git checkout HEAD -- uploads/cus/zixk19hldk1.jpg
git checkout @ -- uploads/cus/zixk19hldk1.jpg