Search Results for: Hooks
the dust settled and things were back into good shape, i said to myself, "self, i bet there's a way to prevent commits to the master branch, because git is second only to emacs in the number of things you can do to/with it." so i went looking, and yes, there is a way: add the following to your .git/hooks
directly to master branch" exit fi i got that from this stackoverflow answer , and it was perfect for me, since i use the bash shell. so i created the pre-commit file, made a trivial readme.md edit, and tried to commit to master. that's when os x mojave's terminal spit back: fatal: cannot exec '.git/hooks...
https://meyerweb.com/eric/thoughts/2020/02/10/preventing-commits-to-the-master-branch-in-os-x-mojave/