git restore --staged

Move all files from the staging area back to the working directory

This is particularly useful when you've accidentally staged a file that you didn't mean to, or if you've made changes to a file that you don't want to commit.

This command doesn't modify your working directory or the contents of the files, it simply unstages the files, meaning they will no longer be included in your next commit.

If a target is passed, such as in git restore --staged <filepath>, the command will only target the files and directories matching that path.