how to exit from git commit message code example

Example 1: how to get out of git bash editor

On Windows GIT Bash Ctrl + X would do nothing and found out it works quite like 
vi/vim. Press i to enter inline insert mode. Type the description at the very 
top, press esc to exit insert mode, then type :x! (now the cursor is at the 
bottom) and hit enter to save and exit.

Example 2: git exit commit message

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