Git rebase -i belong to us

git rebase -i is an *easy* way to squash many commits into one, so your commit log will be nice and pretty.

sella rafaeli
Feb 17, 2014 · 3 min read

The Basics

1. Why you need git rebase -i

Image for post
Image for post
All of your feature branch’s commits

2. How to use git rebase -i

$ git rebase -i HEAD~11
Image for post
Image for post
rebase -i’s list of commit messages, to be re-applied “interactively”
Image for post
Image for post
Image for post
Image for post
$ git rebase -i HEAD~1 
Image for post
Image for post

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch

Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore

Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store