pre-commit Check git merge conflict by default. Install mv pre-commit $HOME/.git/hooks/ git config --global core.hooksPath $HOME/.git/hooks/ Node.js version pre-commit (https://github.com/BarryYan/pre-commit) Demo