diff --git a/doc/source/development/contributing.rst b/doc/source/development/contributing.rst index b810c71e3daa6..90ecee8cf9312 100644 --- a/doc/source/development/contributing.rst +++ b/doc/source/development/contributing.rst @@ -698,6 +698,12 @@ to run its checks with:: without needing to have done ``pre-commit install`` beforehand. +If you want to run checks on all recently commited files on upstream/master you can use:: + + pre-commit run --from-ref=upstream/master --to-ref=HEAD --all-files + +without needing to have done ``pre-commit install`` beforehand. + .. note:: If you have conflicting installations of ``virtualenv``, then you may get an