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