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
eto toggle the--keep-emptiedargument, which keeps any emptied commits after the squash. - Press
ito toggle the--interactiveargument, enabling interactive mode for fine-tuning the squash process.
Workflow:
- Select the revisions you want to squash.
- Press
Sto activate squash mode. - The cursor moves to the parent revision.
- Use
eandito 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
eandito enable both options - Confirm to squash