Skip to main content

4.6.1 Viewing Git Output

Magit runs Git either for side-effects (e.g. when pushing) or to get some value (e.g. the name of the current branch).

When Git is run for side-effects, the process output is logged in a per-repository log buffer, which can be consulted using the magit-process command when things don’t go as expected.

The output/errors for up to ‘magit-process-log-max’ Git commands are retained.

$     (magit-process)

This commands displays the process buffer for the current repository.

Inside that buffer, the usual key bindings for navigating and showing sections are available. There is one additional command.

k     (magit-process-kill)

This command kills the process represented by the section at point.

variable magit-git-debug

This option controls whether additional reporting of git errors is enabled.

Magit basically calls git for one of these two reasons: for side-effects or to do something with its standard output.

When git is run for side-effects then its output, including error messages, go into the process buffer which is shown when using $.

When git’s output is consumed in some way, then it would be too expensive to also insert it into this buffer, but when this option is non-nil and git returns with a non-zero exit status, then at least its standard error is inserted into this buffer.

This is only intended for debugging purposes. Do not enable this permanently, that would negatively affect performance.

variable magit-process-extreme-logging

This option controls whether magit-process-file logs to the *Messages* buffer.

Only intended for temporary use when you try to figure out how Magit uses Git behind the scene. Output that normally goes to the magit-process buffer continues to go there. Not all output goes to either of these two buffers.