I am curious about how to remove the first commit in git.
What is the revision before committing any thing? Does this revision have a name or tag?
I was looking for a way to undo all git commits from a repo, like they never happened.
Rebasing will work up to a point. However, the very first (chronologically the oldest git commit) is always going to be problematic, since it does not have a parent, so that will error out.
None of these answers quite solved it for me. But after lots of searching and trial-and-error, I found this to work!
git update-ref -d HEAD
git push origin master -f
Hope this helps you. Have a great day.