I've been using git for a couple of years and after adding a file using "git add" we can unstage it using command "
git reset HEAD file1 file2
(use "git reset HEAD ..." to unstage)
git reset HEAD a.php test.php #to unstage some left over test files
M means that the working version of the file and the version you have in your last commit are different. You can check where differences are using
git diff <namefile> The command you ran only unstage files. The most probable explanation is that you had all those modified files also before running your git reset command. Maybe those files are generated/created by the application you are working on...