Setting up and using an SVN repository
Thursday, March 13th, 2008Install subversion (Ubuntu)
sudo apt-get install subversion
Make a directory to store the repositories
mkdir /path/to/repository
Create the repository
svnadmin create /path/to/repository
Import existing files into repository
svn import /path/name/to/foo file:///path/to/repository
when you checkout this repository, it will create the directory foo. So to get the svn repository in my ~/work directory as ~/work/foo I would go to ~/work, then
svn co file:///path/to/repository
that is, don’t make a new dir dir called foo and import into there . . . it will make its own dir.
Check out locally
svn checkout file:///path/to/repository /local/workdir
Check out remotely through an ssh connection
svn checkout svn+ssh://user@hostname/path/to/repository/on/remotehost /local/workdir
Update local copy from SVN
svn update
Check what’s been changed
svn status
Resolve a conflict
svn resolved filename
Send these changes to SVN (editor will prompt for revision notes, must be non-empty)
svn commit
Send these changes to SVN, and specify logfile to send as comments
svn commit -F logfile