How to remove a file from the git index
You could just use git rm --cached notes.txt
. This will keep the file but remove it from the index.
git reset HEAD <file>
for removing a particular file.
and git reset HEAD
for removing all files from the git index.