Rewrite .gitignore file