Skip to content

Commit a30a95d

Browse files
fsmunozTim Bannister
andcommitted
Add tide/merge-method-squash option for automated squashing
Co-authored-by: Tim Bannister <[email protected]>
1 parent f032894 commit a30a95d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

contributors/guide/github-workflow.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,11 @@ For mass automated fixups such as automated doc formatting, use one or more
237237
commits for the changes to tooling and a final commit to apply the fixup en
238238
masse. This makes reviews easier.
239239

240+
An alternative to this manual squashing process is to use the Prow and Tide based automation that is configured in GitHub: adding a comment to your PR with `/label tide/merge-method-squash` will trigger the automation so that GitHub squash your commits onto the target branch once the PR is approved. Using this approach simplifies things for those less familiar with Git, but there are situations in where it's better to squash locally; reviewers will have this in mind and can ask for manual squashing to be done.
241+
242+
By squashing locally, you control the commit message(s) for your work, and can separate a large PR into logically separate changes.
243+
For example: you have a pull request that is code complete and has 24 commits. You rebase this against the same merge base, simplifying the change to two commits. Each of those two commits represents a single logical change and each commit message summarizes what changes. Reviewers see that the set of changes are now understandable, and approve your PR.
244+
240245
## Merging a commit
241246

242247
Once you've received review and approval, your commits are squashed, your PR is ready for merging.

0 commit comments

Comments
 (0)