1. Create the repository
svnadmin create ''<path>''
Example (Creates a repository called 'example' inside the dir '~/svn'):
svnadmin create ~/svn/example/
2. Import of existing files
mkdir $TMPDIR/example # create temp. dir cd $TMPDIR/example # change to it mkdir trunk branches tags # create subdirs 'trunk', 'branches', 'tags' mv ''<Old project path>''/* trunk/ # move all existing project file to 'trunk' svn import -m "Initial import" . file://''<path>''/ # import all this
svn import -m "Initial import" . file://$HOME/svn/example/
3. Check out the current version
cd ''<parent directory of working directory>'' svn co file://''<path>''/trunk/ ''<working dir name>''
cd ~/tmp svn co file://$HOME/svn/example/trunk/ example
Instead of 'co' you can also write 'checkout'.
4. Edit working directory
5. Check in the modified version
Inside the working directory:
svn ci [-m "log message"]
Instead of 'ci' you can also write 'commit'.
Because one of your co-workers might have made changes to the project while you were busy with your working copy you should update it from time to time to get aware of this changes. Collisions in files (two people changed a file at the same place) will be displayed without overwritting your changes.
Instead of 'up' you can also write 'update'.
Show the modifications and changes in your working copy. This uses local copies of the originals which are located in an hidden subdir '.svn'. To display also changes made to the repository (from an other person) use the '-u' option.
svn st [-u]
Instead of 'st' you can also write 'stat' or 'status'.
View log entries
svn log ''<files>''
svn add ''<files>''
svn rm ''<files>''
Move files inside the working dir
svn move ''<from>'' ''<to>''
Copy files inside the working dir
svn copy ''<from>'' ''<to>''