After writing commit message, just press Esc Button and then write :wq or :wq! and then Enter to close the unix file.