Emacs provides several commands for navigating the VC Directory buffer, and for marking files as belonging to the current VC fileset.
Move point to the next entry (
Move point to the previous entry (
Move to the next directory entry (
Move to the previous directory entry
Visit the file or directory listed on the current line
Visit the file or directory on the current line, in a separate window
Mark the file or directory on the current line (
putting it in the current VC fileset. If the region is active, mark
all files in the region.
A file cannot be marked with this command if it is already in a marked directory, or one of its subdirectories. Similarly, a directory cannot be marked with this command if any file in its tree is marked.
If point is on a file entry, mark all files with the same status; if
point is on a directory entry, mark all files in that directory tree
vc-dir-mark-all-files). With a prefix argument, mark all
listed files and directories.
Add the file under point to the list of files that the VC should
vc-dir-ignore). For instance, if the VC is Git, it
will append this file to the .gitignore file. If given a
prefix, do this with all the marked files.
Quit the VC Directory buffer, and bury it (
Unmark the file or directory on the current line. If the region is
active, unmark all the files in the region (
If point is on a file entry, unmark all files with the same status; if
point is on a directory entry, unmark all files in that directory tree
vc-dir-unmark-all-files). With a prefix argument, unmark all
files and directories.
Hide files with ‘up-to-date’ or ‘ignored’ status
vc-dir-hide-up-to-date). With a prefix argument, hide items
whose state is that of the item at point.
While in the VC Directory buffer, all the files that you mark with
vc-dir-mark) or M (
are in the current VC fileset. If you mark a directory entry with
m, all the listed files in that directory tree are in the
current VC fileset. The files and directories that belong to the
current VC fileset are indicated with a ‘*’ character in the VC
Directory buffer, next to their VC status. In this way, you can set
up a multi-file VC fileset to be acted on by VC commands like
C-x v v (see Basic VC Editing), C-x v =
(see Old Revisions), and C-x v u (see VC Undo).
The VC Directory buffer also defines some single-key shortcuts for VC commands with the C-x v prefix: =, +, l, i, D, L, G, I, O, and v.
For example, you can commit a set of edited files by opening a VC
Directory buffer, where the files are listed with the ‘edited’
status; marking the files; and typing v or C-x v v
vc-next-action). If the version control system is
changeset-based, Emacs will commit the files in a single revision.
While in the VC Directory buffer, you can also perform search and replace on the current VC fileset, with the following commands:
Search the fileset (
Do a regular expression query replace on the fileset
Do an incremental search on the fileset (
Do an incremental regular expression search on the fileset
Apart from acting on multiple files, these commands behave much like their single-buffer counterparts (see Search).
The VC Directory buffer additionally defines some branch-related commands starting with the prefix B:
Create a new branch (
Prompt for the name of a branch and display the change history of that
Switch to a branch (
vc-retrieve-tag). See Switching Branches.
Delete the marked files, or the current file if no marks
vc-dir-clean-delete). The files will not be marked as
deleted in the version control system, so this function is mostly
useful for unregistered files.
The above commands are also available via the menu bar, and via a context menu invoked by mouse-2. Furthermore, some VC backends use the menu to provide extra backend-specific commands. For example, Git and Bazaar allow you to manipulate stashes and shelves (which are a way to temporarily put aside uncommitted changes, and bring them back at a later time).