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.
Top comments (0)