It appears that git-gui doesn't execute hooks, e.g. pre-commit, when it is run in a git worktree other than the main worktree.