Squashing a Git Repository to a Single Commit

  1. Rebase the repository to 2 commits
git rebase -i $CHECKSUM_OF_FIRST_COMMIT
  1. Soft Reset the last commit
git reset --soft "HEAD^"
  1. Use the softly reset staging area as an --amend commit
git commit --amend -m "Squashed repo to a single commit"