I added and deleted some files after my last commit. I delted the whole subfolder accidentially. The order of git commands:
git add src/app/klicka/*
modified: src/app/klicka/_klicka.scss
new file: src/app/klicka/img/beispiel-buttons.png
new file: src/app/klicka/img/beispiel-lightbox-1.png
new file: src/app/klicka/img/beispiel-lightbox-2.png
new file: src/app/klicka/img/beispiel-lightbox-3.png
new file: src/app/klicka/img/beispiel-pascoe.png
new file: src/app/klicka/img/button-jetzt-ausprobieren.png
new file: src/app/klicka/img/referenzen-row-1.jpg
new file: src/app/klicka/img/referenzen-row-2.jpg
new file: src/app/klicka/img/referenzen-row-3.jpg
but there where still the deleted files
so I did:
git rm */klicka/* $(git ls-files --deleted)
which I got from here:
Removing multiple files from a Git repo that have already been deleted from disk
but it seems you can't use it on a subpattern, so it removed my whole folder.
After that I used git reset
because I wanted to unstage all changes. But now the folder is still gone. I did not commit is there a way to get back the status between the rm and the last commit? I still have other commits to do.