nstage this file from index and also unstage all previous files. code example Example: how to remove all files from staging area git git rm --cached -r .