@@ -217,6 +217,7 @@ there are no glaring errors.
217
217
Once you're all done fixing the conflicts, you need to stage the files that had
218
218
conflicts in them via ` git add ` . Afterwards, run ` git rebase --continue ` to let
219
219
Git know that you've resolved the conflicts and it should finish the rebase.
220
+
220
221
Once the rebase has succeeded, you'll want to update the associated branch on
221
222
your fork with ` git push --force-with-lease ` .
222
223
@@ -263,6 +264,26 @@ You also may want to squash just the last few commits together, possibly
263
264
because they only represent "fixups" and not real changes. For example,
264
265
` git rebase --interactive HEAD~2 ` will allow you to edit the two commits only.
265
266
267
+ ### ` git range-diff `
268
+
269
+ After completing a complicated rebase, or even a relatively simple one, you may
270
+ want to review the changes between your old branch and your new one. You can do
271
+ that with the ` git range-diff master @{u} HEAD ` command, which can be very
272
+ helpful when you had a complicated rebase and you want to make sure you changed
273
+ the right things.
274
+
275
+ Unlike in regular Git diffs, you'll see a ` - ` or ` + ` next to another ` - ` or ` + `
276
+ in the range-diff output. The marker on the left indicates a change between the
277
+ old branch and the new branch, and the marker on the right indicates a change
278
+ you've committed. So, you can think of a range-diff as a "diff of diffs" since
279
+ it shows you the differences between your old diff and your new diff.
280
+
281
+ ` git range-diff ` is a very useful command, but note that it can take some time
282
+ to get used to its output format. You may also find Git's documentation on the
283
+ command useful, especially [ their "Examples" section] [ range-diff-example-docs ] .
284
+
285
+ [ range-diff-example-docs ] : https://git-scm.com/docs/git-range-diff#_examples
286
+
266
287
## No-Merge Policy
267
288
268
289
The rust-lang/rust repo uses what is known as a "rebase workflow." This means
0 commit comments