Making Changes: Add, Commit and Revert
Harry
· 13 Sep 2026
· 1 views
Add New Files
svn add README.md
svn add src/ # recursively adds the folderFiles become versioned only after svn add plus a commit.
Commit
svn commit -m "Implement user login"
# or edit the commit message in an editor
svn commitEvery commit is atomic: either all of it appears as a new revision, or none of it does. Write messages that describe why, not what.
Delete and Move
svn delete old-file.txt
svn move old-name.txt new-name.txt # remembers historysvn move records the rename in version history, keep using it instead of delete plus add.
Revert
svn revert file.txt # discard local changes
svn revert -R . # revert the whole working copyReverting only affects your working copy, never the repository.
Undo a Commit
svn merge -c -42 . # reverse-apply revision 42
svn commit -m "Undo r42"Key Points
- Add schedules files; commit publishes them.
- Commits are atomic and need good messages.
- svn move preserves history across renames.
- Revert touches only the working copy.