Squash Operation
The squash operation allows you to combine multiple revisions into a single commit, streamlining your repository history. This feature is accessible from the Revisions view and provides interactive options for advanced control.
To activate squash, press S
in the Revisions view. The cursor will automatically move to the parent of the selected revisions, making it easy to choose the target for the squash.
Options:
- Press
e
to toggle the--keep-emptied
argument, which keeps any emptied commits after the squash. - Press
i
to toggle the--interactive
argument, enabling interactive mode for fine-tuning the squash process.
Workflow:
- Select the revisions you want to squash.
- Press
S
to activate squash mode. - The cursor moves to the parent revision.
- Use
e
andi
to set your desired options. - Confirm to execute the squash operation.
Example:
- To squash two commits interactively and keep emptied:
- Select the commits
- Press
S
- Press
e
andi
to enable both options - Confirm to squash