Catalog / Subversion (SVN) Cheatsheet
Subversion (SVN) Cheatsheet
A comprehensive guide to Subversion (SVN) commands and concepts for version control.
Basic Commands
Checkout
|
Downloads a working copy from the repository. Example: |
|
Shorthand for |
Update
|
Brings your working copy up to date with the latest changes from the repository. Example: |
|
Shorthand for |
Commit
|
Sends your changes to the repository. Example: |
|
Shorthand for |
Add
|
Adds a file or directory to version control. Example: |
Delete
|
Marks a file or directory for deletion in the next commit. Example: |
|
Shorthand for |
|
Alias for |
Status
|
Shows the status of files and directories in your working copy. Example: |
|
Shorthand for |
Branching and Merging
Branching
|
Creates a branch in the repository. Example: |
|
Copy from working copy to create a branch in the repository
|
Switching
|
Switches your working copy to a different branch or tag. Example: |
|
Shorthand for |
Merging
|
Merges changes from a branch or tag into your working copy. Example: |
|
Merge changes from a specific revision range. Example: |
Resolve Conflicts
After merging, conflicts may arise. Use
|
Inspecting History
Log
|
Shows the commit history of a file or directory. Example: |
|
Shows the commit history with verbose output. |
Diff
|
Shows the differences between your working copy and the repository. Example: |
|
Shows the differences between two revisions. Example: |
Blame
|
Shows who last modified each line of a file. Example: |
|
Alias for |
|
Alias for |
Info
|
Displays information about a file or directory, such as its URL and revision. Example: |
Advanced Operations
Revert
|
Discards local changes and reverts a file or directory to its original state. Example: |
|
Recursively reverts all changes in a directory. |
Cleanup
|
Locking
|
Locks a file in the repository to prevent others from modifying it. Example: |
|
Unlocks a file in the repository. Example: |
Import
|
Imports an unversioned tree into the repository. Example: |
Export
|
Exports a clean directory tree from the repository, without version control metadata. Example: |
|
Exports a specific revision Example: |