As of git 1.6.2, you can use git rebase --root -i
.
For each commit except the first, change pick
to squash
.
More Related Contents:
- What is the difference between merge –squash and rebase?
- Combine the first two commits of a Git repository?
- Rebasing a Git merge commit
- Squash the first two commits in Git? [duplicate]
- Squash my last X commits together using Git
- Undoing a git rebase
- Edit the root commit in Git?
- Insert a commit before the root commit in Git?
- What’s the difference between ‘git merge’ and ‘git rebase’?
- How to remove/delete a large file from commit history in the Git repository?
- Remove folder and its contents from git/GitHub’s history
- Rebasing a branch including all its children
- How do I recover/resynchronise after someone pushes a rebase or a reset to a published branch?
- How to rebase many branches (with the same base commit) at once?
- How to squash my last x commits together?
- How do I squash my last N commits together?
- Change old commit message using `git rebase`
- Git interactive rebase without opening the editor
- Git: How to rebase to a specific commit?
- Is there a way to squash a number of commits non-interactively?
- Git rebase branch with all parent branches (or dependent sub-branches)
- How to cherry-pick multiple commits
- How to substitute text from files in git history?
- How do I run git rebase –interactive in non-interactive manner?
- git rebase without changing commit timestamps
- What are the practical consequences of rewriting Git history?
- Git push rejected “non-fast-forward”
- Rebase feature branch onto another feature branch
- Rebasing and what does one mean by rebasing pushed commits
- What does “Auto packing the repository for optimum performance” mean?