pythondjangogitpygtkgitignore

Best practices for adding .gitignore file for Python projects?


I'm trying to collect some of my default settings, and one thing I realized I don't have a standard for is .gitignore files. There's a great thread showing a good .gitignore for Visual Studio projects, but I don't see many recommendations for Python and related tools (PyGTK, Django).

So far, I have...

*.pyc
*.pyo

...for the compiled objects and...

build/
dist/

...for the setuptools output.

Are there best practices for .gitignore files, and where can I go for more about these best practices?


Solution

  • When using buildout I have following in .gitignore (along with *.pyo and *.pyc):

    .installed.cfg
    bin
    develop-eggs
    dist
    downloads
    eggs
    parts
    src/*.egg-info
    lib
    lib64
    

    Thanks to Jacob Kaplan-Moss

    Also I tend to put .svn in since we use several SCM-s where I work.