Search code examples
gitignore

How do I modify my .gitignore file by adding !*.css at the end?


I'm new to pulling/pushing code and gitignore, and I can't figure out how to modify the .gitignore file.


Solution

  • You can simply do:

    echo "!*.css" >> .gitignore
    git add .gitignore
    git commit -m "Whitelist css files"
    git push -u origin master
    

    That would update your .gitignore file.