The following command will prevent files to staged when doing git add .
git add .
git update-index --assume-unchanged [file]
To undo this change, use the following command below:
git update-index –no-assume-unchanged [file]