Skip to content

Instantly share code, notes, and snippets.

@Sharique55
Created June 15, 2025 15:41
Show Gist options
  • Select an option

  • Save Sharique55/aca1973ae43f01fbef3dfbd48be556d9 to your computer and use it in GitHub Desktop.

Select an option

Save Sharique55/aca1973ae43f01fbef3dfbd48be556d9 to your computer and use it in GitHub Desktop.
πŸ“ A complete and beautifully formatted SVN (Subversion) Command Cheat Sheet with detailed explanations and examples β€” perfect for beginners and professionals managing legacy repositories.

πŸ› οΈ SVN Commands Cheat Sheet - Explained with Examples

A comprehensive guide to mastering SVN (Subversion) version control β€” with essential commands, syntax, and practical examples for real-world use.


πŸ“¦ 1. svn checkout

Clone or fetch a working copy from the repository.

svn checkout https://example.com/svn/repository

πŸ“ This creates a working copy of the repo so you can start modifying files.


βž• 2. svn add

Add new files or directories to version control.

svn add file.txt

πŸ“ Schedules the file for addition. Commit is needed to finalize.


βœ… 3. svn commit

Submit changes to the repository.

svn commit -m "Added login feature"

πŸ“ Always include a meaningful message with -m.


πŸ”„ 4. svn update

Update your working copy with the latest changes from the repo.

svn update

πŸ“ Resolves out-of-date issues by syncing with the repository.


πŸ“‹ 5. svn status

View the state of your working directory.

svn status

πŸ“ Symbols used: ? = untracked, M = modified, A = added, D = deleted.


🧾 6. svn diff

See what’s changed in your working copy.

svn diff file.txt

πŸ“ Displays line-by-line differences between working copy and base version.


πŸ“œ 7. svn log

View revision history.

svn log file.txt

πŸ“ Shows all commits affecting the specified file or directory.


🧹 8. svn revert

Discard local uncommitted changes.

svn revert file.txt

πŸ“ Be cautious β€” this action cannot be undone!


πŸ” 9. svn info

Get metadata about your files or directories.

svn info file.txt

πŸ“ Includes revision, author, repository URL, etc.


❌ 10. svn delete

Mark a file or directory for deletion.

svn delete file.txt

πŸ“ Will be removed after committing.


πŸ” 11. svn move

Move or rename files/directories.

svn move old.txt new.txt

πŸ“ This is tracked as a move operation instead of delete + add.


πŸ“‚ 12. svn copy

Duplicate a file or branch in repo (great for feature branching).

svn copy https://example.com/svn/trunk https://example.com/svn/branches/feature-x

πŸ“ Efficiently used for creating branches and tags.


πŸ†˜ Bonus: svn help

View help for any command.

svn help commit

πŸ“ Get all options and usage for a command.


πŸ“š Summary

Command Description
svn checkout Create working copy from repo
svn add Add file to version control
svn commit Save changes to repo
svn update Sync local changes with repo
svn status See file statuses
svn diff View differences
svn log View history of changes
svn revert Undo local uncommitted changes
svn info Show file/directory metadata
svn delete Schedule a file for deletion
svn move Rename or move a file/directory
svn copy Duplicate repo paths for branching/tagging

πŸ–ΌοΈ Pairing SVN with Visual Tools

While mastering the command line is essential, sometimes a visual interface can speed up workflow, especially for beginners or when managing large repositories.

Here are two popular visual SVN clients:


🐒 TortoiseSVN (Windows Only)

A powerful and easy-to-use Subversion client for Windows, fully integrated into the Windows Explorer.

πŸ”§ Key Features:

  • Right-click integration for SVN commands
  • Visual file comparison and merge tools
  • Icon overlays to show file status
  • Commit logs and revision graphs

πŸ”— Official Website: https://tortoisesvn.net


πŸ’» SmartSVN (Cross-Platform: Windows, macOS, Linux)

A feature-rich, professional-grade SVN client with a consistent UI across platforms.

πŸ”§ Key Features:

  • Unified Commit, Merge, and Conflict Resolution dialogs
  • Repository browsing and history tracking
  • Built-in file compare and diff tools
  • Suitable for enterprise workflows

πŸ”— Official Website: https://www.smartsvn.com


✨ Pro Tip

You can use both command-line SVN and GUI tools together! They work seamlessly since they operate on the same .svn metadata.

⭐ If you found this helpful, consider starring my GitHub: @Sharique55

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment