- 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
pickthe commits you would like to squash, personally I use
fto pick the commits. So instead of
f(replace pick with f) expect for the first commit.
ESC, :x to exit VIM.
- Verify in git log and your commits should be squashed.
Claim your page on DEV before someone else does
Level up every day
Classic DEV Post from Aug 6 '19