Download Magit User Manual

Transcript
Chapter 10: Diffing
11
10 Diffing
Magit typically shows diffs in the “unified” format.
In any buffer that shows a diff, you can type e anywhere within the diff to show the
two versions of the file in Ediff. If the diff is of a file in the status buffer that needs to be
merged, you will be able to use Ediff as an interactive merge tool. Otherwise, Ediff will
simply show the two versions of the file.
To show the changes from your working tree to another revision, type d. To show the
changes between two arbitrary revisions, type D.
You can use a within the diff output to apply the changes to your working tree. As usual
when point is in a diff header for a file, all changes for that file are applied, and when it is
in a hunk, only that hunk is. When the region is active, the applied changes are restricted
to that region.
Typing v will apply the selected changes in reverse.