You can use the following commands to open a file in git bash:
vi -- to open a file
i -- to insert into the file
ESC button followed by :wq -- to save and close the file
Hope it helps.
Any other terminal based text editor, like vim, nano and many will also do the job just fine.