Generating src docs for every commit Run the following command: echo -e "tox -e src-docs\ngit add src-docs\n" > .git/hooks/pre-commit chmod +x .git/hooks/pre-commit