diff --git a/hooks/post_checkout b/hooks/post_checkout
index 1c6f495cf052472ce3eb7347e46131d193890008..71fa8f796d8a1ce59bc60a82e2f3c47390cad6d6 100644
--- a/hooks/post_checkout
+++ b/hooks/post_checkout
@@ -1,4 +1,4 @@
 #!/bin/bash
 # Docker hub does a recursive clone, then checks the branch out,
 # so when a PR adds a submodule (or updates it), it fails.
-git submodule update --init
+git submodule update --init --recursive