Modifying .gitignore was unnecessary

You can simply use the -f option to commit files that are usually in the
.gitignore