There's a directory that had gone missing, I never intentionally deleted it (might've been accidental). Assume the directory structure is:
/parent /dir dirFile.js parentFile.js
If I'm in /parent
:
$ lsparentFile.js$ ls -a...parentFile.js$ mkdir dirmkdir: cannot create directory ‘dir’: File exists$ rm -rf dir<empty>$ ls dir<empty>$ stat dir File: dir Size: 4096 Blocks: 0 IO Block: 4096 directoryDevice: fh/15d Inode: 1688849861548050 Links: 0Access: (0777/drwxrwxrwx) Uid: ( 1000/ l) Gid: ( 1000/ l)Access: 2020-07-14 16:35:37.808833200 -0400Modify: 2020-07-14 16:35:37.808833200 -0400Change: 2020-07-14 16:35:37.808833200 -0400 Birth: -
When this directory was last available, I modified dir/dirFile.js
and ran git commit
. Then, I noticed dir
disappeared, so I ran git reset HEAD~1 --mixed
. However, the file didn't come back and git status
shows it was deleted.
I'm unable to git stash
to undo the delete because it throws error: unable to create file dir/dirFile.js: No such file or directory
.
I'm using Ubuntu 18.04.4 on WSL.
What's going on here?