Squashing Last Few Commits
Last updated
Last updated
If just want to squash last few commits we can do a Mixed
or Soft
reset to their parent commit and recommit the changes.
Note: with Mixed
reset, we have to stage the files again, whereas Soft
will keep the files in staging area.
For example, in below image, we want to squash the last two commits WIP: Continue Fix blah blah
and WIP: Fix blahblah
. We can right click their parent commit my awesome changes
, select the Reset current branch to here
, then select the Mixed:xxx
option.
Commmand line: