From TechWiki

For installing and configuring subversion see Subversion Version Control System

Subversion and Eclipse see Development Subversion



svn status
svn info
svn help
svn help command

From Scratch

Not sure if really best way, but works...

mkdir svnrepo
svnadmin create svnrepo
svn import ~/mywork file:///svnrepo
svn checkout file:///svnrepo

Import Local Files

You have local unversioned files on your computer and would like to copy them into the subversion repository, starting a new project. Use

svn import localDir [repo]

where [repo] can be something like




Initial Checkout

You know there are files in the subversion directory you would like to checkout the project locally. This is an initial checkout:

svn checkout


Revert To Older Revision

svn merge -rHEAD:1234 .

And More...

Checkout older revision

svn co --revision 12345 .

Look at logs of stuff checked in

svn log
svn log -v


Eclipse's dot-files (e.g., .classpath) and the directories containing the binaries are registered and marked as changes by subversion. So although your code is identical to the repository, subversion tags the project in eclipse as 'edited'.

To get subversion to ignore local setups, you need to use the ignore option. Note however, that eclipse can't do this (results in revision conflicts) and you need to do this in the terminal.

Go to the directory and type

svn status

to see something like

M     .
?      .classpath


svn propset svn:ignore .classpath .

and commit

svn commit 

Type some text in the emacs editor and 'Ctrl-x' and 'Ctrl-s' to save and 'Ctrl-x' and 'Ctrl-c' to exit the editor.

For multiple files and directories use

svn propedit svn:ignore .

and add the entries into the editor. Note that wild cards work and for directory names one should omit the '/' at the end. After committing you can always look at the ignore patterns for the current directory by executing

svn propedit svn:ignore .

once again.

See also


Ignoring directories is sometimes a pain.


svn st

gives you

?      data/arch

and you want to ignore arch, go to directory data and

svn propedit svn:ignore .

(you can also stay in the current directory and use svn propedit svn:ignore ./data) Then you simply add


When you do svn st you should only get

 M     .

with arch being invisible.

Remove .svn Folders

Using Linux (what else;-)

find . -name '.svn' -type d -exec rm -rf {} \;

Moving Repository Location

Move a directory in the repository (an immediate commit, so it requires a commit message):

svn move -m "Moving"

Note that

must exist.

However, in your working copy you must redirect the URL:

svn info

tells you the current one. Theoretically, I think, you must use

svn switch

Unfortunately, as I had current changes, this all didn't really work that well: after the switch

svn status

gave me many and strange changes. So I made a backup, deleted the working copy, did a checkout and put the modified files in by hand :-(

See also the option

svn switch --relocate 

for more...