 <p>If you simply want to squash all commits into a single, initial commit, just reset the repository and amend the first commit:</p> <pre><code>git reset hash-of-first-commit git add -A git commit --amend </code></pre> <p>Git reset will leave the working tree intact, so everything is still there. So just add the files using git add commands, and amend the first commit with these changes. Compared to rebase -i you'll lose the ability to merge the git comments though.</p>