- setup protected branch on main
- commit and push some stuff
- get rejected because you committed on main then tried to push it
- need a way to both block commit on local and remote default branch
- set hooks path
HOOKPATH=~/hooks
git config --global core.hooksPath $HOOKPATH
- copy content to re-commit hook
mkdir -p $HOOKDIR
(copy pre-commit content to $HOOKPATH/pre-commit)