Imported from GitHub issue wikimedia/fresh#6.
Original task written on 16 Sep 2019 by @Krinkle:Escalation of rights by having an npm script add a shell script to .git/hooks which survives the container and would not should up in "git status" and would execute on the host machine (outside the container) on future git commands like git commit or git pull.