Next: , Previous: , Up: Inspecting   [Contents][Index]


5.5 Ediffing

This section describes how to enter Ediff from Magit buffers. For information on how to use Ediff itself, see (ediff)Top.

e     (magit-ediff-dwim)

Compare, stage, or resolve using Ediff.

This command tries to guess what file, and what commit or range the user wants to compare, stage, or resolve using Ediff. It might only be able to guess either the file, or range/commit, in which case the user is asked about the other. It might not always guess right, in which case the appropriate magit-ediff-* command has to be used explicitly. If it cannot read the user’s mind at all, then it asks the user for a command to run.

E     (magit-ediff)

This transient prefix command binds the following suffix commands and displays them in a temporary buffer until a suffix is invoked.

E r     (magit-ediff-compare)

Compare two revisions of a file using Ediff.

If the region is active, use the revisions on the first and last line of the region. With a prefix argument, instead of diffing the revisions, choose a revision to view changes along, starting at the common ancestor of both revisions (i.e., use a "…" range).

E m     (magit-ediff-resolve)

Resolve outstanding conflicts in a file using Ediff, defaulting to the file at point.

Provided that the value of merge.conflictstyle is diff3, you can view the file’s merge-base revision using / in the Ediff control buffer.

In the rare event that you want to manually resolve all conflicts, including those already resolved by Git, use ediff-merge-revisions-with-ancestor.

E s     (magit-ediff-stage)

Stage and unstage changes to a file using Ediff, defaulting to the file at point.

E u     (magit-ediff-show-unstaged)

Show unstaged changes to a file using Ediff.

E i     (magit-ediff-show-staged)

Show staged changes to a file using Ediff.

E w     (magit-ediff-show-working-tree)

Show changes in a file between HEAD and working tree using Ediff.

E c     (magit-ediff-show-commit)

Show changes to a file introduced by a commit using Ediff.

E z     (magit-ediff-show-stash)

Show changes to a file introduced by a stash using Ediff.

User Option: magit-ediff-dwim-show-on-hunks

This option controls what command magit-ediff-dwim calls when point is on uncommitted hunks. When nil, always run magit-ediff-stage. Otherwise, use magit-ediff-show-staged and magit-ediff-show-unstaged to show staged and unstaged changes, respectively.

User Option: magit-ediff-show-stash-with-index

This option controls whether magit-ediff-show-stash includes a buffer containing the file’s state in the index at the time the stash was created. This makes it possible to tell which changes in the stash were staged.

User Option: magit-ediff-quit-hook

This hook is run after quitting an Ediff session that was created using a Magit command. The hook functions are run inside the Ediff control buffer, and should not change the current buffer.

This is similar to ediff-quit-hook but takes the needs of Magit into account. The regular ediff-quit-hook is ignored by Ediff sessions that were created using a Magit command.


Next: , Previous: , Up: Inspecting   [Contents][Index]