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


5.9 Blaming

Also see the git-blame(1) manpage.

M-x magit-blame     (magit-blame)

Display edit history of FILE up to REVISION.

Interactively blame the file being visited in the current buffer. If the buffer visits a revision of that file, then blame up to that revision. Otherwise, blame the file’s full history, including uncommitted changes.

If Magit-Blame mode is already turned on then blame recursively, by visiting REVISION:FILE (using magit-find-file), where revision is the revision before the revision that added the lines at point.

ARGS is a list of additional arguments to pass to git blame; only arguments available from magit-blame-popup should be used.

M-x magit-blame-popup     (magit-blame-popup)

This prefix command shows the above suffix command along with the appropriate infix arguments in a popup buffer.

RET     (magit-show-commit)

Show the commit at point. If there is no commit at point or with a prefix argument, prompt for a commit.

SPC     (magit-diff-show-or-scroll-up)

Update the commit or diff buffer for the thing at point.

Either show the commit or stash at point in the appropriate buffer, or if that buffer is already being displayed in the current frame and contains information about that commit or stash, then instead scroll the buffer up. If there is no commit or stash at point, then prompt for a commit.

DEL     (magit-diff-show-or-scroll-down)

Update the commit or diff buffer for the thing at point.

Either show the commit or stash at point in the appropriate buffer, or if that buffer is already being displayed in the current frame and contains information about that commit or stash, then instead scroll the buffer down. If there is no commit or stash at point, then prompt for a commit.

n     (magit-blame-next-chunk)

Move to the next chunk.

N     (magit-blame-next-chunk-same-commit)

Move to the next chunk from the same commit.

p     (magit-blame-previous-chunk)

Move to the previous chunk.

P     (magit-blame-previous-chunk-same-commit)

Move to the previous chunk from the same commit.

q     (magit-blame-quit)

Turn off Magit-Blame mode. If the buffer was created during a recursive blame, then also kill the buffer.

M-w     (magit-blame-copy-hash)

Save the hash of the current chunk’s commit to the kill ring.

When the region is active, then save that to the kill-ring, like kill-ring-save would.

t     (magit-blame-toggle-headings)

Show or hide blame chunk headings.

User Option: magit-blame-heading-format

Format string used for blame headings.

User Option: magit-blame-time-format

Format string used for time strings in blame headings.

User Option: magit-blame-show-headings

Whether to initially show blame block headings. The headings can also be toggled locally using command magit-blame-toggle-headings.

User Option: magit-blame-goto-chunk-hook

Hook run by magit-blame-next-chunk and magit-blame-previous-chunk.


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