GitHub Squash commits on your branch
Niharika Pujari
Posted on April 2, 2020
Squash all your commits on a branch?
- Get a complete history of commits by running:
- Now, run the below command to squash the commits on your branch, Number of commits = commits you would like to squash.
- After you run the previous command you now need to
pick
the commits you would like to squash, personally I usef
to pick the commits. So instead ofpick
INSERTf
(replace pick with f) expect for the first commit.
ESC, :x to exit VIM.
- Verify in git log and your commits should be squashed.
💖 💪 🙅 🚩
Niharika Pujari
Posted on April 2, 2020
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.