Copy everything (in the folder containing the .git) to a backup, then delete everything and restart. Make sure you have the git remote handy:
git remote -v
origin [email protected]:rwldrn/idiomatic.js.git (fetch)
origin [email protected]:rwldrn/idiomatic.js.git (push)
Then
mkdir mygitfolder.backup
cp mygitfolder/* mygitfolder.backup/
cd mygitfolder
rm -r * .git*
git init
git remote add origin [email protected]:rwldrn/idiomatic.js.git
Then merge any new files manually, and try to keep your computer turned on.