Post

Delete the local .git folder. Reinitialise local git. Add the files. Delete the copy on github. Recreate the repository on github. Push the now nice and clean local copy. Repeat from step one ever time you screw up the local copy of git because its so complex that if you sneeze you lose your HEAD.