The git pre-push hook does not check whether there are uncommitted changes in the repo or not. It probably should.
I discovered this after running git commit --amend but forgetting to actually git add the changed files. I then did a git push --force-with-lease. The pre-push hook then ran checks on the uncommitted files, found no issues, and then proceeded to allow me to push the commited files, which were different from the files that the pre-push hook checks. The pushed files failed the tidy check on github actions.