git ignore everything but python files code example Example: git ignore everything but python files #ignore all kind of files *.* #except php files !*.php