If you're using the technique described by Blundell (remove everything then add everything) on a windows machine you may hit an issue with all the files being modified because the line endings change. To avoid that use the following commands:
git rm -r --cached . git config --global core.autocrlf false git add --renormaliserenormalize . git add . This removes all files from the index, configures git to not change line endings, renormalises line endings and stages all the files you just removed except those specified in the .gitignore
Then git commit
Reference: How to remove files from repository listed in .gitignore without changing whitespace