
This is the Title of the Book, eMatter Edition
Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
40
|
Chapter 3: Guided Tour
Commit Your Changes
Finally! Your edits are finished, you’ve merged all changes from the server, and
you’re ready to commit your changes to the repository.
The
svn commit command sends all of your changes to the repository. When you
commit a change, you need to supply a log message, describing your change. Your
log message will be attached to the new revision you create. If your log message is
brief, you may wish to supply it on the command line using the
--message (or -m)
option:
$ svn commit --message "Corrected number of cheese slices."
Sending sandwich.txt
Transmitting file data .
Committed revision 3.
However, if you’ve been composing your log message as you work, you may want to
tell Subversion to get the message from a file by passing the filename with the
--file
switch:
$ svn commit --file logmsg
Sending sandwich
Transmitting file data .
Committed revision 4.
If you fail to specify either the --message or --file switch, then Subversion will auto-
matically launch your favorite editor (as defined in the environment variable
$EDITOR)
for composing a log message.
If you’re in your editor writing a commit message and decide that you
want to cancel your commit, you can just quit your editor without sav-
ing changes. If you’ve already saved your commit message, simply ...