git config --edit
A simple solution to the problem is nano index.html and git or any other terminal will open the file right on the terminal, then you edit from there.
nano index.html
You see commands at the bottom of the edit page on how to save.