It will depend of your distribution.
For gentoo:
emerge -av subversion
For Fedora:
yum install subversion
For Debian and (K/X/Edu)Ubuntu:
apt-get install subversion
For Mandriva:
urpmi subversion
Go to a directory where you want to put the directory of all your project repository. Then, you just have to connect to the repository:
svn co http://www.sds-project.fr/svn/$YOUR_PROJECT$/ --username $YOUR_USERNAME$
Use the SVN plugin for Eclipse: SubClipse.
If you want to fetch the new modification other users can have done in the repository, you need to upgrade your svn. For that, go to your repository directory and enter the following command:
svn update
To add a file (or a directory) to your repository, you go to the directory that contain the file and you just have to type the following command:
svn add file.txt
For example, to add a README file, you just have to type:
svn add README
To delete a file (or a directory) that is already in the repository, you go to the directory that contain the file and type the following command:
svn delete file.txt
For example, to delete a README file, you just have to type:
svn delete README
You can copy a file from a directory of the svn to another directory on the same svn repository. For example, if you want to move the README file in the doc/ directory.
To move a file, you type the following command:
svn copy fichier.txt rep/
For example, for the README file:
svn copy README doc/
If you want to move a file from a directory to another or to rename a file, you need to use the command move.
svn move fichier.txt fichier.old
svn move fichier.txt rep/
For example, to rename the README file to README.old:
svn move README README.old
For example, to move the README file to the doc/ directory:
svn move README doc/
Before a commit or a update, if you want to know which files and directories change on the SVN between now and your last update, you can use the status command:
svn status
If you want to cancel the add of a file before you have commit, you can use
svn revert file.txt
When you need to know all the change in a file, you can use:
svn log fichier.txt
Regularly, you need to send to the SVN server all your change in the repository that you have validate using the add command. For that, you need to use:
svn commit
When you think the developement work in trunk/ is good enough to be a release, you can create a new major version:
svn copy http://www.sds-project.fr/svn/$YOUR_PROJECT$/trunk http://www.sds-project.fr/svn/$YOUR_PROJECT$/tags/1.0
Then when you want to create a minor release:
svn merge http://www.sds-project.fr/svn/$YOUR_PROJECT$/trunk@head http://www.sds-project.fr/svn/$YOUR_PROJECT$/tags/1.0@head trunk/
You can install and use RapidSVN or directly integrate in your Explorer TortoiseSVN.
This document has been write by Jonathan ROUZAUD-CORNABAS.
For any informations or re-use of this document, please mail the author (jonathan.rouzaud-cornabas AT ensi-bourges DOT fr).