Next: , Up: Revision Tags

32.1.10.1 Making and Using Revision Tags

There are two basic commands for tags; one makes a tag with a given name, the other retrieves a named tag.

C-x v s name <RET>
Define the working revision of every registered file in or under the current directory as a tag named name (vc-create-tag).


C-x v r name <RET>
For all registered files at or below the current directory level, retrieve the tagged revision name. This command will switch to a branch if name is a branch name and your VCS distinguishes branches from tags. (vc-retrieve-tag).

This command reports an error if any files are locked at or below the current directory, without changing anything; this is to avoid overwriting work in progress.

Tags are inexpensive, so you need not hesitate to create them whenever they are useful. Branches vary in cost depending on your VCS; in older ones they may be expensive.

You can give a tag or branch name as an argument to C-x v = or C-x v ~ (see Old Revisions). Thus, you can use it to compare a tagged version against the current files, or two tagged versions against each other.