The status buffer contains logs for the unpushed and unpulled commits,
but that obviously isn’t enough. The transient prefix command
magit-log, on l, features several suffix commands, which show a
specific log in a separate log buffer.
Like other transient prefix commands, magit-log also features several
infix arguments that can be changed before invoking one of the suffix
commands. However, in the case of the log transient, these arguments
may be taken from those currently in use in the current repository’s
log buffer, depending on the value of magit-prefix-use-buffer-arguments
(see Transient Arguments and Buffer Variables).
For information about the various arguments, see
the git-log(1) manpage.
The switch ++order=VALUE is converted to one of --author-date-order,
--date-order, or --topo-order before being passed to git log.
The log transient also features several reflog commands. See Reflog.
magit-log) ¶This transient prefix command binds the following suffix commands along with the appropriate infix arguments and displays them in a temporary buffer until a suffix is invoked.
magit-log-current) ¶Show log for the current branch. When HEAD is detached or with a
prefix argument, show log for one or more revs read from the
minibuffer.
magit-log-head) ¶Show log for HEAD.
magit-log-related) ¶Show log for the current branch, its upstream and its push target.
When the upstream is a local branch, then also show its own
upstream. When HEAD is detached, then show log for that, the
previously checked out branch and its upstream and push-target.
magit-log-other) ¶Show log for one or more revs read from the minibuffer. The user can input any revision or revisions separated by a space, or even ranges, but only branches, tags, and a representation of the commit at point are available as completion candidates.
magit-log-branches) ¶Show log for all local branches and HEAD.
magit-log-all-branches) ¶Show log for all local and remote branches and HEAD.
magit-log-all) ¶Show log for all references and HEAD.
Two additional commands that show the log for the file or blob that is
being visited in the current buffer exists, see Commands for Buffers Visiting Files. The command magit-cherry also shows a log, see
Cherries.
The transient prefix command magit-log-refresh, on L, can be used to
change the log arguments used in the current buffer, without changing
which log is shown. This works in dedicated log buffers, but also in
the status buffer.
magit-log-refresh) ¶This transient prefix command binds the following suffix commands along with the appropriate infix arguments and displays them in a temporary buffer until a suffix is invoked.
magit-log-refresh) ¶This suffix command sets the local log arguments for the current buffer.
magit-log-set-default-arguments) ¶This suffix command sets the default log arguments for buffers of the same type as that of the current buffer. Other existing buffers of the same type are not affected because their local values have already been initialized.
magit-log-save-default-arguments) ¶This suffix command sets the default log arguments for buffers of the same type as that of the current buffer, and saves the value for future sessions. Other existing buffers of the same type are not affected because their local values have already been initialized.
magit-toggle-margin) ¶Show or hide the margin.
magit-log-refresh) ¶This transient prefix command binds the following suffix commands along with the appropriate infix arguments and displays them in a temporary buffer until a suffix is invoked.
See Refreshing Logs.
magit-log-bury-buffer) ¶Bury the current buffer or the revision buffer in the same frame.
Like magit-mode-bury-buffer (which see) but with a negative prefix
argument instead bury the revision buffer, provided it is displayed
in the current frame.
magit-go-backward) ¶Move backward in current buffer’s history.
magit-go-forward) ¶Move forward in current buffer’s history.
magit-log-move-to-parent) ¶Move to a parent of the current commit. By default, this is the first parent, but a numeric prefix can be used to specify another parent.
magit-log-move-to-revision) ¶Read a revision and move to it in current log buffer.
If the chosen reference or revision isn’t being displayed in the current log buffer, then inform the user about that and do nothing else.
If invoked outside any log buffer, then display the log buffer of the current repository first; creating it if necessary.
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.
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.
magit-log-toggle-commit-limit) ¶Toggle the number of commits the current log buffer is limited to. If the number of commits is currently limited, then remove that limit. Otherwise set it to 256.
magit-log-double-commit-limit) ¶Double the number of commits the current log buffer is limited to.
magit-log-half-commit-limit) ¶Half the number of commits the current log buffer is limited to.
Insert more log entries automatically when moving past the last
entry. Only considered when moving past the last entry with
magit-goto-*-section commands.
Whether to show the refnames after the commit summaries. This is useful if you use really long branch names.
When showing more commits than specified by this option, then the
--color argument, if specified, is silently dropped. This is
necessary because the ansi-color library, which is used to turn
control sequences into faces, is just too slow.
When showing more commits than specified by this option, then the
--show-signature argument, if specified, is silently dropped. This
is necessary because checking the signature of a large number of
commits is just too slow.
Magit displays references in logs a bit differently from how Git does it.
Local branches are blue and remote branches are green. Of course that
depends on the used theme, as do the colors used for other types of
references. The current branch has a box around it, as do remote
branches that are their respective remote’s HEAD branch.
If a local branch and its push-target point at the same commit, then their names are combined to preserve space and to make that relationship visible. For example:
origin/feature [green][blue-] instead of feature origin/feature [blue-] [green-------]
Also note that while the transient features the --show-signature
argument, that won’t actually be used when enabled, because Magit
defaults to use just one line per commit. Instead the commit
colorized to indicate the validity of the signed commit object,
using the faces named magit-signature-* (which see).
For a description of magit-log-margin see Log Margin.
In buffers which show one or more logs, it is possible to show
additional information about each commit in the margin. The options
used to configure the margin are named magit-INFIX-margin, where INFIX
is the same as in the respective major-mode magit-INFIX-mode. In
regular log buffers that would be magit-log-margin.
This option specifies whether the margin is initially shown in Magit-Log mode buffers and how it is formatted.
The value has the form (INIT STYLE WIDTH AUTHOR AUTHOR-WIDTH).
nil, then the margin is shown initially.
age (to show the age of the commit), age-abbreviated (to
abbreviate the time unit to a character), or a string (suitable
for format-time-string) to show the actual date. Option
magit-log-margin-show-committer-date controls which date is being
displayed.
You can change the STYLE and AUTHOR-WIDTH of all magit-INFIX-margin
options to the same values by customizing magit-log-margin before
magit is loaded. If you do that, then the respective values for the
other options will default to what you have set for that variable.
Likewise if you set INIT in magit-log-margin to nil, then that is used
in the default of all other options. But setting it to t, i.e.
re-enforcing the default for that option, does not carry to other
options.
This option specifies whether to show the committer date in the margin. This option only controls whether the committer date is displayed instead of the author date. Whether some date is displayed in the margin and whether the margin is displayed at all is controlled by other options.
magit-margin-settings) ¶This transient prefix command binds the following suffix commands, each of which changes the appearance of the margin in some way.
In some buffers that support the margin, L is instead bound to
magit-log-refresh, but that transient features the same commands, and
then some other unrelated commands.
magit-toggle-margin) ¶This command shows or hides the margin.
magit-cycle-margin-style) ¶This command cycles the style used for the margin.
magit-toggle-margin-details) ¶This command shows or hides details in the margin.
When the user has to select a recent commit that is reachable from
HEAD, using regular completion would be inconvenient (because most
humans cannot remember hashes or "HEAD~5", at least not without double
checking). Instead a log buffer is used to select the commit, which
has the advantage that commits are presented in order and with the
commit message.
Such selection logs are used when selecting the beginning of a rebase and when selecting the commit to be squashed into.
In addition to the key bindings available in all log buffers, the following additional key bindings are available in selection log buffers:
magit-log-select-pick) ¶Select the commit at point and act on it. Call
magit-log-select-pick-function with the selected commit as
argument.
magit-log-select-quit) ¶Abort selecting a commit, don’t act on any commit.
This option specifies whether the margin is initially shown in Magit-Log-Select mode buffers and how it is formatted.
The value has the form (INIT STYLE WIDTH AUTHOR AUTHOR-WIDTH).
nil, then the margin is shown initially.
age (to show the age of the commit), age-abbreviated (to
abbreviate the time unit to a character), or a string (suitable
for format-time-string) to show the actual date. Option
magit-log-margin-show-committer-date controls which date is being
displayed.
Also see the git-reflog(1) manpage.
These reflog commands are available from the log transient. See Logging.
magit-reflog-current) ¶Display the reflog of the current branch.
magit-reflog-other) ¶Display the reflog of a branch or another ref.
magit-reflog-head) ¶Display the HEAD reflog.
This option specifies whether the margin is initially shown in Magit-Reflog mode buffers and how it is formatted.
The value has the form (INIT STYLE WIDTH AUTHOR AUTHOR-WIDTH).
nil, then the margin is shown initially.
age (to show the age of the commit), age-abbreviated (to
abbreviate the time unit to a character), or a string (suitable
for format-time-string) to show the actual date. Option
magit-log-margin-show-committer-date controls which date is being
displayed.
Cherries are commits that haven’t been applied upstream (yet), and are
usually visualized using a log. Each commit is prefixed with - if it
has an equivalent in the upstream and + if it does not, i.e., if it is
a cherry.
The command magit-cherry shows cherries for a single branch, but the
references buffer (see References Buffer) can show cherries for
multiple "upstreams" at once.
Also see the git-reflog(1) manpage.
magit-cherry) ¶Show commits that are in a certain branch but that have not been merged in the upstream branch.
This option specifies whether the margin is initially shown in Magit-Cherry mode buffers and how it is formatted.
The value has the form (INIT STYLE WIDTH AUTHOR AUTHOR-WIDTH).
nil, then the margin is shown initially.
age (to show the age of the commit), age-abbreviated (to
abbreviate the time unit to a character), or a string (suitable
for format-time-string) to show the actual date. Option
magit-log-margin-show-committer-date controls which date is being
displayed.