Git still showing deleted files after a commit
If it lists the files under the "to be committed" section, then just proceed with the commit; the files will remain deleted. (Git tracks deletions too, not just changes.)
If it lists the files under the "changed but not updated" section, then you have two options:
- Undelete them by restoring the version in the index:
git checkout path/to/folder
- Mark them deleted in Git, then commit:
git rm -r path/to/folder
git add -u .
If you type git status and the result says up to date, but in red it says
deleted: folder/example0.jpg
deleted: folder/example1.jpg
deleted: folder/example2.jpg
You need to enter this for it to be removed permanently git add -u .
then all the red text will be marked in green.
**** Dont forget the space between the letter u and the period
This will add deletes as well.
git add -u .
Check what's staged to be committed with:
git status