undo git add

Shell
git reset
// undo add for one file
git reset <file>

// undo add for all files
git resetgit reset <file> or git resethttps://guide.freecodecamp.org/miscellaneous/how-to-undo-a-git-add/git reset <file>

Source

Also in Shell: