Minimal Subversion tutorial
- svnadmin create /home/johanf/repos
Import an existing project:
- mkdir existing_project
- mkdir existing_project/branches
- mkdir existing_project/tags
- mkdir existing_project/trunk
- # put your files in directory 'trunk'
- svn import existing_project file:///home/johanf/repos/myproject -m "initial import"
Note that the name existing_project is irrelevant, files are stored in myproject.
Check out files:
- svn checkout file:///home/johanf/repos/myproject/trunk new_name
Here, you must supply the name of the project, myproject, but you can name the resulting dir to whatever you like, e.g. new_name.
In the examples above, repos is the name of your repository.
Now you have a working dir. You could use vim to edit, commit and add new files now.
Mappings in vim:
- ,sa Add current file
- ,sc Commit current file
- ,sg Return to the source buffer
Add a new dir under version control:
- svn mkdir -m "Making dir php." http://home/johanf/repos/vc/php
Checking this out (so that the added dir appears in the hierarchy):
- svn checkout file:///home/johanf/repos/vc/trunk vc
- ~/svn_setup repos $REPOS
- cd dv
- svn co $REPOS/python/trunk python
- cd python
Now add, commit etc
Transmitting file data ..svn: Commit failed (details follow):
svn: Can't move '/media/johanf-pc/media/polo/JohanFrid/newrep/db/transactions/2-1.txn/rev' to '/media/johanf-pc/media/polo/JohanFrid/newrep/db/revs/3': Operation not permitted