Hi brian, I checked it by replacing the printf line in my example with this one: printf '#!/bin/bash\necho GIT_DIR is: $GIT_DIR\ncd git-submodulerepo\necho Git says my files are:\ngit ls-files\necho ---------------\necho Filesystem says my files are:\nls -w1\necho ---------------\n' > .git/hooks/post-commit In both hooks, GIT_DIR is empty, so this shouldn't be the problem. Thanks anyways. On 2020-02-25 02:13, brian m. carlson wrote: > Can you check to see if the GIT_DIR environment variable is set in your > hook? In some cases, Git sets various GIT_* environment variables when > calling a hook or command, and if you want another repository, you'd > need to unset those values. >