SVN

SVN Cheatsheet #

Subversion (SVN) is an open-source version control system that manages files and directories, and the changes made to them, over time. It allows users to recover older versions of their data or examine the history of how their data has changed. Subversion was created by CollabNet Inc. in 2000 and is widely used in software development for maintaining current and historical versions of files such as source code, web pages, and documentation.

Repository Management #

Command/OptionExampleDescription
svnadmin createsvnadmin create /path/to/repoCreate a new SVN repository
svn checkout (co)svn checkout https://example.com/repoCheck out a working copy from a repository
svn importsvn import /path/to/project https://example.com/repo -m "Initial import"Import a project into a repository

Working with Repositories #

Command/OptionExampleDescription
svn update (up)svn updateBring changes from the repository into the working copy
svn commit (ci)svn commit -m "Commit message"Send changes from the working copy to the repository
svn addsvn add file.txtSchedule a file or directory for addition to the repository
svn delete (del)svn delete file.txtSchedule a file or directory for deletion from the repository
svn copy (cp)svn copy trunk/branch new-branchCopy a file or directory in the repository
svn move (mv)svn move old-name new-nameMove or rename a file or directory in the repository

Viewing Changes #

Command/OptionExampleDescription
svn status (stat, st)svn statusPrint the status of working copy files and directories
svn diffsvn diffDisplay the differences between two revisions or paths
svn logsvn logShow the log messages for a set of revision(s) and/or path(s)

Branching and Tagging #

Command/OptionExampleDescription
svn copy (cp)svn copy trunk branches/new-branch -m "Creating a new branch"Create a branch
svn copy (cp)svn copy trunk tags/release-1.0 -m "Tagging version 1.0"Create a tag

Merging Changes #

Command/OptionExampleDescription
svn mergesvn merge https://example.com/repo/branches/branchMerge changes from one branch into another
svn resolvesvn resolve --accept working file.txtResolve conflicts on a working copy

Repository Maintenance #

Command/OptionExampleDescription
svnadmin dumpsvnadmin dump /path/to/repo > repo_dumpfileCreate a dump of the repository
svnadmin loadsvnadmin load /path/to/repo < repo_dumpfileLoad a dump file into a repository
svnadmin verifysvnadmin verify /path/to/repoVerify the integrity of the repository data

Miscellaneous #

Command/OptionExampleDescription
svn infosvn infoDisplay information about a local or remote item
svn revertsvn revert file.txtRevert changes in the working copy
svn cleanupsvn cleanupRecursively clean up the working copy
svn propget (pget)svn propget svn:ignoreGet the value of a property on files, directories, or revisions
svn propset (pset)svn propset svn:ignore "*.log" .Set the value of a property on files, directories, or revisions
svn proplist (plist)svn proplist -vList all properties on files, directories, or revisions

This cheatsheet covers the most commonly used SVN commands and options, helping you to manage repositories, commits, branches, merges, and more effectively.

SVN

Explore our comprehensive cheatsheets to enhance your knowledge and efficiency. Each cheatsheet provides detailed command options, examples, and descriptions to help you master various tools and technologies.