fix exit code issue when trying to commit with git