How to rebase all the commits from the beginning

Solution 1:

git rebase -i --root will start an interactive rebase of all commits from the beginning.

From there, you can squash all commits into one and/or perform other edits.

Solution 2:

You could rebase and squash everything if you wanted to (except the initial commit) but why bother? Simply delete your .git directory, run git init to recreate it, git add everything, and git commit to make a new initial commit.