How to install and use svn locally
Svn is a software versioning and revision controlling system that can be used to organize your code written in any programming language. I use it often locally to organize my latex, vhdl, SystemC or other types of files. Here you can find some instructions how to use it locally
- Create a local repository folder (for instance
/home/user/repos
) - Create a repository for a project (for instance
project1
) with the following command:svnadmin create /home/user/repos/project1
- Import files you want to track with svn with
svn import folder/ - m "Initial import message" file:///home/user/repos/project1
wherefolder
is the folder containing files you wan to track and “Initial import message” is the message you want to associate to your initial import - You are now ready to use you svn repository associated to your project
project1
. - First thing to do is to synchronize your working directory with the repository
project1
. - Create a working directory somewhere (for instance
/home/user/working_copy
) and move to this folder and do the followingsvn co path_to_local_server
, where path to the local server isfile:///home/user/repos/project1
- To commit changed files do
svn commit -m "Message"
- To see all log files
svn log
or the log files from a specific revision (from 5 to now)svn log -r 5:HEAD
- To see differences between actual and last updated revision version
svn diff
- To synchronize your working directory with the last revision
svn update