How can I reset a remote and local Git repository to remove all commits?
I would like to start fresh with the current Head as the initial commit.
Were I you I would do something like this:
Before doing anything please keep a copy (better safe than sorry)
git checkout master
git checkout -b temp
git reset --hard
git add .
git commit -m 'Squash all commits in single one'
git push origin temp
After doing that you can delete other branches.
Result: You are going to have a branch with only 2 commits.
Use
git log --onelineto see your commits in a minimalistic way and to find SHA-1 for commits!