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
[...] 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, [...]