Setting up a local SVN repository
You can create a Subversion repository on your computer and use file:// scheme to interact with it locally. This approach can help you use Subversion locally to track personal files and single-person projects.
The following procedure creates a minimal environment for an existing project. It converts a directory with a project into a working copy of a newly-created local Subversion repository. As result you can modify the files in the working copy and track the changes in your local repository.
On Unix:
- Create a parent directory .svnrepos where you will place your SVN repositories:
$ mkdir -p $HOME/.svnrepos/ - Create a new repository MyRepo under .svnrepos:
$ svnadmin create ~/.svnrepos/MyRepo - Create a recommended project layout in the new repository:
$ svn mkdir -m "Create directory structure." \ file://$HOME/.svnrepos/MyRepo/trunk \ file://$HOME/.svnrepos/MyRepo/branches \ file://$HOME/.svnrepos/MyRepo/tags - Change directory to ./MyProject where your unversioned project is located:
$ cd $HOME/MyProject - Convert the current directory into a working copy of the trunk/ in the repository:
$ svn checkout file://$HOME/.svnrepos/MyRepo/trunk ./ - Schedule your project's files to be added to the repository:
$ svn add --force ./ - Commit the project's files:
$ svn commit -m "Initial import." - Update your working copy:
$ svn update
Comments
Post a Comment