Fixed git commit message writing

Refactored git settings so the auto commands are correctly called.