Now, if a developer tries to commit with a bad message, Git aborts. This doesn't just work for command-line commits; it works for GUI tools and IDEs because everything eventually writes to COMMIT-EDITMSG .
echo "Hotfix: Resolve null pointer exception" > .git/COMMIT_EDITMSG git commit --no-edit COMMIT-EDITMSG
Your $EDITOR environment variable is misconfigured, or your editor crashed. Check with echo $EDITOR . Fix: git config --global core.editor "nano" (or your preferred editor). Now, if a developer tries to commit with