Undo git add . (unstage everything)
Safe: nothing is lost
Short answer
Run git restore --staged . from the top of the repository. Nothing is staged any more, and your files keep every change.
The commands, one by one
- 1
git restore --staged ..means this folder and everything in it, so every staged file is unstaged. Files on disk don't change. - 2
git status -sNew files are back to
??(untracked) and edited ones showMin the second column.