Display the change history for the current fileset
Display the change history for the current repository
Display the changes that a “pull” operation will retrieve
Display the changes that will be sent by the next “push” operation
Display the history of changes made in the region of file visited by
the current buffer (
Search the change history for a specified pattern.
C-x v l (
vc-print-log) displays a buffer named
*vc-change-log*, showing the history of changes made to the
current file, including who made the changes, the dates, and the log
entry for each change (these are the same log entries you would enter
via the *vc-log* buffer; see Log Buffer). Point is
centered at the revision of the file currently being visited. With a
prefix argument, the command prompts for the revision to center on,
and the maximum number of revisions to display.
If you call C-x v l from a VC Directory buffer (see VC Directory Mode) or a Dired buffer (see Dired), it applies to the file listed on the current line.
C-x v L (
vc-print-root-log) displays a
*vc-change-log* buffer showing the history of the entire
version-controlled directory tree (RCS, SCCS, CVS, and SRC do not
support this feature). With a prefix argument, the command prompts
for the maximum number of revisions to display. A numeric prefix
argument specifies the maximum number of revisions without prompting.
When the numeric prefix argument is 1, as in C-1 C-x v L or
C-u 1 C-x v L, the command prompts for the revision ID, and
displays the log entry of that revision together with the changes
(diffs) it introduced. (Some less capable version control systems,
such as RCS and CVS, don’t have commands to show a revision log with
its diffs; for them the command displays only the log entry, and you
can request to show the diffs by typing d or D, see
The C-x v L history is shown in a compact form, usually
showing only the first line of each log entry. However, you can type
log-view-toggle-entry-display) in the
*vc-change-log* buffer to reveal the entire log entry for the
revision at point. A second RET hides it again.
On a decentralized version control system, the C-x v I
vc-log-incoming) command displays a log buffer showing the
changes that will be applied, the next time you run the version
control system’s pull command to get new revisions from another
repository (see Pulling / Pushing). This other repository is the default
one from which changes are pulled, as defined by the version control
system; with a prefix argument,
vc-log-incoming prompts for a
specific repository. Similarly, C-x v O
vc-log-outgoing) shows the changes that will be sent to
another repository, the next time you run the push command; with a
prefix argument, it prompts for a specific destination repository.
In the *vc-change-log* buffer, you can use the following keys to move between the logs of revisions and of files, and to examine and compare past revisions (see Old Revisions):
Move to the previous revision entry. (Revision entries in the log buffer are usually in reverse-chronological order, so the previous revision-item usually corresponds to a newer revision.) A numeric prefix argument is a repeat count.
Move to the next revision entry. A numeric prefix argument is a repeat count.
Move to the log of the previous file, if showing logs for a multi-file VC fileset. Otherwise, just move to the beginning of the log. A numeric prefix argument is a repeat count.
Move to the log of the next file, if showing logs for a multi-file VC fileset. A numeric prefix argument is a repeat count.
Annotate the revision on the current line (see Old Revisions).
Modify the change comment displayed at point. Note that not all VC systems support modifying change comments.
Visit the revision indicated at the current line.
Display a diff between the revision at point and the next earlier revision, for the specific file.
Display the changeset diff between the revision at point and the next earlier revision. This shows the changes to all files made in that revision.
In a compact-style log buffer (e.g., the one created by C-x v L), toggle between showing and hiding the full log entry for the revision at point.
Because fetching many log entries can be slow, the
*vc-change-log* buffer displays no more than 2000 revisions by
default. The variable
vc-log-show-limit specifies this limit;
if you set the value to zero, that removes the limit. You can also
increase the number of revisions shown in an existing
*vc-change-log* buffer by clicking on the ‘Show 2X
entries’ or ‘Show unlimited entries’ buttons at the end of the
buffer. However, RCS, SCCS, CVS, and SRC do not support this feature.
A useful variant of examining history of changes is provided by the command vc-region-history (by default bound to C-x v h), which shows a *VC-history* buffer with the history of changes made in the region of the current buffer’s file between point and the mark (see Mark). The history of changes includes the commit log messages and also the changes themselves in the Diff format.
Invoke this command after marking in the current buffer the region in whose changes you are interested. In the *VC-history* buffer it pops up, you can use all of the commands available in the *vc-change-log* buffer described above, and also the commands defined by Diff mode (see Diff Mode).
This command is currently available only with Git and Mercurial (hg).
vc-log-search allows searching for a pattern in the
log of changes. It prompts for a pattern (a regular expression), and
displays all entries in the change history whose log messages match
the pattern. When invoked with a prefix argument, the command will
also prompt for a specific VCS shell command to run for this purpose.