![]() ![]() I assume that you already know the benefits of keeping track of old revision of projects or important documents such as a resume or a thesis you have been writing. Subversion offers you a very convenient yet strong method to do so, and the easiest way to do so with Subversion (SVN) is to create a local, home, repository intended for a single user – you. The repository we are going to create will be used by a single user, working locally on the machine. In this tutorial I will assume the repository will be created for a project called “project1”. “project1” can be a real project you are doing, a paper you are writing or any thing else that can be stored under revision control (that almost everything). From the command line do the following: $ mkdir /home/user/svnrep We will start by creating the repository. ![]() In the first line we create a directory to house all of your repositories (I assume you are working under the username “user”). I prefer to use different repositories for different projects that are unrelated, no matter how small they are. Because I use many repositories, I prefer to have a single directory underneath all repositories will reside in an organized way (i.e. no junk files or any other kind of stuff except directories). Next thing, is to cd into the directory we created, and actually create the repository using the svnadmin command. To repository we’ve created is called “project1”. The brand new “project1” repository is currently empty and in revision 0. This will change once we put some data in it. $ svn import /home/user/project1 file:///home/user/svnrep/project1/trunk -m "Initial import of project1" The first thing you do with a new repository is to import initial project data into it. Will import the current project1’s file into the repository (assuming that project1 indeed resides in /home/user/project1). The trunk appended to the end of the repository URL, is part of the directory layout convention used by many Subversion users. The last part of the command is the message that will be attached to the import in the SVN log. Now the repository holds data and you are ready to checkout the code from it, and start working. Checkout a Working Copy and Start Working Unity local smartsvn repository code# When using SVN (as well as in most revision control systems) you don’t work directly on the repository. To checkout a working copy from the repository, use: $ svn co file:///home/user/svnrep/project1/trunk /home/user/project1_work Instead you checkout a working copy from it, and work on this copy. This will create a working copy of the repository under /home/user/project1_work. Assuming you are already inside the directory of the working copy, just do: $ svn commit -m "Some log message" You can edit this copy safely.Īfter you’ve done editing your working copy, you will want to commit those changes back to the repository. This will send you changes back to the repository and store them there. To view a list of log messages that were attached to the operations on the repository, use: $ svn log Change the “Some log message” to some useful short description of the changes you’ve made. Unity local smartsvn repository how to#. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |