Name

svn commit — Send changes from your working copy to the repository.

Synopsis

svn commit [PATH...]

Description

Send changes from your working copy to the repository. If you do not supply a log message with your commit by using either the --file or --message switch, svn will launch your editor for you to compose a commit message. See the editor-cmd section in the section called “Config”.

svn commit will send found lock tokens and release locks on all PATHS committed (recursively) unless --no-unlock is passed.

Tip

If you begin a commit and Subversion launches your editor to compose the commit message, you can still abort without committing your changes. If you want to cancel your commit, just quit your editor without saving your commit message and Subversion will prompt you to either abort the commit, continue with no message, or edit the message again.

Alternate Names

ci (short for “check in”; not “co”, which is short for “checkout”)

Changes

Working copy, repository

Accesses Repository

Yes

Switches

--message (-m) TEXT
--file (-F) FILE
--quiet (-q)
--no-unlock
--non-recursive (-N)
--targets FILENAME
--force-log
--username USER
--password PASS
--no-auth-cache
--non-interactive
--encoding ENC
--config-dir DIR

Examples

Commit a simple modification to a file with the commit message on the command line and an implicit target of your current directory (“.”):

$ svn commit -m "added howto section."
Sending        a
Transmitting file data .
Committed revision 3.

Commit a modification to the file foo.c (explicitly specified on the command line) with the commit message in a file named msg:

$ svn commit -F msg foo.c
Sending        foo.c
Transmitting file data .
Committed revision 5.

If you want to use a file that's under version control for your commit message with --file, you need to pass the --force-log switch:

$ svn commit --file file_under_vc.txt foo.c
svn: The log message file is under version control
svn: Log message file is a versioned file; use '--force-log' to override

$ svn commit --force-log --file file_under_vc.txt foo.c
Sending        foo.c
Transmitting file data .
Committed revision 6.

To commit a file scheduled for deletion:

$ svn commit -m "removed file 'c'."
Deleting       c

Committed revision 7.