You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: contributors/guide/contributor-cheatsheet/README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -373,7 +373,7 @@ git rebase -i HEAD~3
373
373
git push --force
374
374
```
375
375
376
-
**Note**: you can also ask your reviewer to add the `tide/merge-method-squash` label to your PR (this can be done by a reviewer by issuing the command: `/label tide/merge-method-squash`), this will let the bot take care of squashing _all_commits that are part of this PR and will not result in removal of the `LGTM` label (if already applied) or re-run of the CI tests.
376
+
**Note**: you can also use the bot to help squash commits, please see [squashing commits] for more details.
Copy file name to clipboardExpand all lines: contributors/guide/pull-requests.md
+41-1Lines changed: 41 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -318,7 +318,47 @@ For more information, see [squash commits](./github-workflow.md#squash-commits).
318
318
For instance, writing a code munger could be one commit, applying it could be another, and adding a precommit check could be a third.
319
319
One could argue they should be separate pull requests, but there's really no way to test/review the munger without seeing it applied, and there needs to be a precommit check to ensure the munged output doesn't immediately get out of date.
320
320
321
-
**Note**: you can also ask your reviewer to add the `tide/merge-method-squash` label to your PR (this can be done by a reviewer by issuing the command: `/label tide/merge-method-squash`), this will let the bot take care of squashing _all_ commits that are part of this PR and will not result in removal of the `LGTM` label (if already applied) or re-run of the CI tests.
321
+
**Note**: you can also use the `tide/merge-method-squash` label on your PR to let the bot handle squashing
322
+
_all_ commits, which can be done by commenting `/label tide/merge-method-squash`. As opposed to squashing by hand, this will prevent removal of the `lgtm` label (if already applied) and re-run of the CI tests. Although,
323
+
if this label is used, please know the following:
324
+
325
+
- All commit messages will be squashed and combined and the final commit message will be a combination of all
326
+
commit messages according to how GitHub generates the [message for a squash merge](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/incorporating-changes-from-a-pull-request/about-pull-request-merges#merge-message-for-a-squash-merge), for example, if this is the lifecycle of your PR:
327
+
```
328
+
# commit 1
329
+
Original commit msg
330
+
331
+
Some useful information
332
+
Some more useful information
333
+
```
334
+
```
335
+
# commit 2
336
+
Address review comments
337
+
```
338
+
```
339
+
# commit 3
340
+
Fix test
341
+
```
342
+
After applying the label, if the PR is merged, the final commit message will end up being:
343
+
```
344
+
Title of your PR (#PR-number)
345
+
346
+
* Original commit msg
347
+
348
+
Some useful information
349
+
Some more useful information
350
+
351
+
* Address review comments
352
+
353
+
* Fix test
354
+
```
355
+
Since commit messages are meant to be a record of the "why" and "what" of your changes, having
356
+
messages like "Address review comments" in the final commit message adds no real value in terms
357
+
of communicating the "what"s and "why"s of your change. Please see [Commit Message Guidelines](#commit-message-guidelines) for more details on writing better commit messages.
358
+
359
+
Using this label can help when squashing by hand is considered too challenging or not worth the
360
+
extra effort. It can also speed up merging because squashing by hand implies getting another LGTM
0 commit comments