Your comments

In my personal use case, I want to switch off commit hooks only temporarily, for all commands.

I agree that you don't want to pollute the UI. I don't have a clear solution for this now.

You could follow the pattern of Windows' way of temporarily disabling the virus scanner. It switches back on automatically after, say 15 minutes.

In my use case, I have a pre-commit hook that lints my Typescript code. If it fails, the commit fails. Another solution would be to allow the commit/squash process to continue, even with a failing commit hook. Maybe just a notification with the option to cancel or continue?