Examples of SVN repsoitory creation and SVN operations with the repository

 

 

svnadmin create svnrepos

 

 

svn mkdir -m "Make myjavaproject directory" file:///usershome/your-username/svnrepos/myjavaproject

 

 

svn import HelloWorld.java file:///usershome/your-username/svnrepos/myjavaproject/HelloWorld.java -m "First Import"( add a file to the repository)

 

 

svn checkout file:///usershome/your-username/svnrepos/myjavaproject   /usershome/your-username/projects/

(checkout a file from the repository to a folder named projects)

 

 

svn commit -m "change on helloworld"(Run only in directory where file is located)

(make a change in the program and commit the changes to the repository copy)

 

svn list --verbose file:///usershome/your-username/svnrepos/myjavaproject

(lists whats in the repository)

 

svn update(Run only in folder where file is located. Updates your working copy from whats in the repository)

 

svn info(Run only in folder where file is located.)

 

 

 

Make a second directory for another project

svn mkdir -m "Make studentjavaproject directory" file:///usershome/your-username/svnrepos/studentjavaproject

 

 

svn import Example.java file:///usershome/your-username/svnrepos/studentjavaproject/Example.java -m "Second Import"

 

 

svn checkout file:///usershome/your-username/svnrepos/studentjavaproject   /usershome/your-username/projects2