I'm trying to go back in time with Git but I don't think I quite understand how it's done. I explain my procedure.
- I create a test repository by starting it with the license
- I create the readme and confirm with a commit
- I add a test file called "index.html", I commit and push (so far so good)
- I do git log to see the hash of the initial commit (where I only had the license)
- I do git reset --hard HASHdelCOMMIT (in local the files are deleted)
Now is where I lose myself. How can I push these changes to GitHub? In other words, all the files are deleted and the repository is left with only the license file.
To push the current state you just have to force it back to the origin (-fo --force).