Rewrite gitignore file