website: Add pre-commit doc to Contributing page

Change-Id: Ie95078bb38208c0ba3f51dc34b4a788cc9aaa40f
Reviewed-by: Jason Lowe-Power <>
Tested-by: Jason Lowe-Power <>
Maintainer: Jason Lowe-Power <>
diff --git a/_pages/ b/_pages/
index b27f285..0cb3a25 100644
--- a/_pages/
+++ b/_pages/
@@ -139,6 +139,33 @@
+### Using pre-commit
+To help enforce our style guide we use use [pre-commit](
+ pre-commit is a git hook and, as such, must be
+explicitly installed by a gem5 developer.
+To install the gem5 pre-commit checks, execute the following in the gem5
+pip install pre-commit
+pre-commit install
+Once installed pre-commit will run checks on modified code prior to running the
+`git commit` command (see [our section on commiting](#committing) for more
+details on commiting your changes). If these tests fail you will not be able to
+These same pre-commit checks are run as part of Gerrit's CI checks (those
+which must pass to obtain a "Verified" status required for a change to be
+incorporated into the develop branch). It is therefore recommended that
+developers install pre-commit to catch style errors early.
+**Note:** As of the v22.0 release, the pre-commit hook is only available on the
+develop branch.
 ## Compiling and running tests
 The minimum criteria for a change to be submitted is that the code is