.gitignore for Python developers

If you are using Git for version control for your Python egg and buildout development below are is a sample which you might want to put into your .gitignore file.


Suggestions for new ignores are welcome.

\"\" Subscribe to RSS feed Follow me on Twitter Follow me on Facebook Follow me Google+

6 thoughts on “.gitignore for Python developers

  1. How about Jython class files (*.class, the equivalent of *.pyc)?

    And if any of the developers use Mac OS X, ignore the .DS_Store folders.

  2. I don’t know if it belongs here, but I usually also ignore

    to avoid fallout from dreamweaver users with whom i may share my source tree. (Yup, web developer here)

  3. I have “dist” in addition, which gets created whenever you make a release. You also could ignore virtualenv things as well: “.Python include lib” and finally I have “local.cfg” in my list.

  4. If you are using coverage.py to measure code coverage, then you’ll also want to ignore:


    and probably:


    If you are building C extensions, then add:

    *.pyd *.so

Leave a Reply

Your email address will not be published. Required fields are marked *