If you want to discard your current set of changes and revert to the
last version checked in, use C-x v u (vc-revert-buffer
).
This cancels your last check-out, leaving the file unlocked. If you want
to make a different set of changes, you must first check the file out
again. C-x v u requires confirmation, unless it sees that
you haven't made any changes since the last checked-in version.
C-x v u is also the command to use to unlock a file if you lock it and then decide not to change it.
You can cancel a change after checking it in, with C-x v c
(vc-cancel-version
). This command discards all record of the
most recent checked in version. C-x v c also offers to revert
your work file and buffer to the previous version (the one that precedes
the version that is deleted). If you say no, then the buffer and
work file do not change.
Be careful when invoking C-x v c, as it is easy to throw away a lot of work with it. To help you be careful, this command always requires confirmation with yes.