Get Git to ignore Python .pyc files at paulcarvill.com, the home of Paul Carvill on the web

link: paulcarvill at flickr

paulcarvill.com

Hi, I'm Paul Carvill and I'm a web developer. I am Head of Interface Development at LBi, Europe's largest digital agency.

I also like walking, cooking, Bollywood and rock 'n' roll.

Get Git to ignore Python .pyc files

posted: Monday, January 4th, 2010 at 5:50 pm

This will tell Git to ignore the files you specify by listing them in a special file, which you will tell Git the location of. This will only work on your local installation of Git. If someone clones your Git repository and adds files of the type you are ignoring, those files will be noticed and tracked by Git unless they also tell Git to ignore those files. For more on ignoring files on a per-repository basis, look here.

In Terminal:

git config --global core.excludesfile path/to/excludesfile

Then create your excludes file:

vim path/to/excludesfile

and add the files to exclude, using wildcards if necessary:

*.pyc


Tags: , ,

One Response to “Get Git to ignore Python .pyc files”

  1. [...] the original post here: Get Git to ignore Python .pyc files – paulcarvill.com By admin | category: python | tags: book, building, files, first-16b, following-simple, [...]