Collect a keypress in a bash githook

After a flurry of accidental pushes direct to the main branch at work, I decided we need a technical solution. The obvious answer would be to use ’s protected branches, but that’s not practical at our org. Next best: a # to check the branch one is committing to, and have the user confirm or cancel as the case may be.

Continue reading “Collect a keypress in a bash githook”