Skip to content

SVN

Make sure your EDITORs are setup, if in doubt

export EDITOR=vim; export SVN_EDITOR=vim

Common SVN Commands

Checking out a Repo

Example

svn co https://sams-fantasic-hams.io/repos/scripts

This will checkout the scripts directory the repos.

Checking the Status

Example

svn info
svn status
svn log
svn log --diff

With the above commands it will assume your current working directory as the path. You can use a file path such as ~/svn/scripts you can also a URI like file:///home/user/svn/scripts/file_or_dir_here or https://sams-fantasic-hams.io/repos/scripts/file_or_dir_here

When using svn log commands you should pipe it into less or head otherwise there will be a lot of information in your terminal

Committing Changes

Example

svn commit -m "Commit Message Here"

Adding a New File

Example

svn add NewFileHere

Creating a New Directory

Example

svn mkdir NewDirHere

Removing a Data

Example

svn rm DataToRemoveHere

Reverting Changes

Example

svn merge -r current_version:previous_version

There is a shortcut to just revert the latest change svn merge -c -REV . or if you need to do multiple commits add them with a comma svn merge -c -REV,-REV .

Once you do that, you will then need to commit the changes. svn commit -m "Reverted to REV"

Accept Server Cert

svn --trust-server-cert 
svn --trust-server-cert --non-interactive