0% found this document useful (0 votes)
43 views

SVN+SSH Tutorial IIIT-Bangalore DB 101/2010: $ Sudo Apt-Get Install Subversion

This document provides instructions for installing and using Subversion (SVN) with SSH authentication. It explains how to [1] install the SVN client software, [2] initialize a new SVN repository on the server, and [3] check out a working copy of the repository. Examples are given for common SVN commands like committing changes, adding/removing files, merging updates, and viewing history. Links are also included for additional SVN resources.

Uploaded by

Philip Joseph
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
43 views

SVN+SSH Tutorial IIIT-Bangalore DB 101/2010: $ Sudo Apt-Get Install Subversion

This document provides instructions for installing and using Subversion (SVN) with SSH authentication. It explains how to [1] install the SVN client software, [2] initialize a new SVN repository on the server, and [3] check out a working copy of the repository. Examples are given for common SVN commands like committing changes, adding/removing files, merging updates, and viewing history. Links are also included for additional SVN resources.

Uploaded by

Philip Joseph
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

SVN+SSH Tutorial

IIIT- Bangalore DB 101/2010

Installing client software


$ sudo apt-get install subversion

Initializing the repository


On the server, use the svnadmin tool to create a new repository:

$ svnadmin create $HOME/my-repo

This command would create a new repository structure under ~/my-repo.

Generating a working copy


On your workstation, use the svn import command to create a working copy of the repository:

$ mkdir my-files
$ svn import -m "My files" my-files \
svn+ssh://my-username@my-server/my-home/my-repo
$ rm -rf my-files
$ svn checkout svn+ssh://my-username@my-server/my-home/my-repo/my-files

TortoiseSVN users can generate a working copy by right-clicking on an empty directory, selecting
the SVN Checkout... command and entering the URL of the repository in the dialog.

Examples
$ mkdir my-website
$ cd my-website
# See the local modifications to text files since the last commit.
$ svn diff |more
$ svn diff |vim -
# Merge changes committed to the repository since last update/checkout.
$ svn up
# Add an existing directory and all the files it contains.
$ svn add old-images/

# Create an empty directory.


$ svn mkdir new-images/

# Remove a file or directory.


$ svn remove foo.txt

# Rename a file or directory on the repository.


$ svn move file1 file2
$ svn move dir1/ dir2/
# Display the history information for a file or directory.
$ svn log images
#
# Commit changes to the working copy into the repository. Unless the
# commit message is given on the command line with "-m", it will bring
# up your text editor ($EDITOR).
#
$ svn commit
$ svn commit -m 'Summary of changes'

Links
• Subversion Home
• The Subversion Book
• The Subversion Commands
• Details of SSH authentication
• TortoiseSVN, GUI client for Windows

You might also like