cd mkdir temp_svn_repo_store svnadmin create /users/jmackey/temp_svn_repo_store/RobsTechnicalSeminar # now create the project mkdir temp mkdir temp/tech_seminar echo "List of speakers/topics" > temp/tech_seminar/speakers.txt # Good enough, now import the project into the SVN repo. svn import ~/temp/ \ file:///users/jmackey/temp_svn_repo_store/RobsTechnicalSeminar \ -m "initial import of new project" # "-m" is a flag to specify the log-message to write with the import. # You can now delete the project (maybe check it imported ok first...). rm -rf temp # Check out a working copy of the project: mkdir working_copy svn co file:///users/jmackey/temp_svn_repo_store/RobsTechnicalSeminar working_copy/ # Edit a file: cd working_copy/tech_seminar/ echo "Rob: Intro to seminar, other stuff, all very interesting" >> speakers.txt echo "Mackey: boring talk about SVN, won't invite him back." >> speakers.txt # Create a new file and edit it: echo "List of Attendees:" > attendance.txt echo "------------------" >> attendance.txt echo "Rob: attends every week. punctual. contributes questions. A" >> attendance.txt echo "J.Mackey: usually attends. always late (even for own talk). C-" >> attendance.txt svn add attendance.txt # Commit changes svn commit -m "Added Rob and J.Mackey to list of speakers. Added Rob and J.Mackey to new file keeping track of attendance." # make a new directory svn mkdir topics_speakers svn mkdir attendees svn mv speakers.txt topics_speakers svn mv attendance.txt attendees # Always commit before and after moving files (otherwise SVN can get confused) svn commit -m "Reorganised directory structure; moved attendance.txt and speakers.txt" # Check the history of files. svn log topics_speakers/speakers.txt svn log -rHEAD attendees/attendance.txt svn log -r1 attendees/attendance.txt svn log -r1 topics_speakers/speakers.txt svn diff -r3 topics_speakers/speakers.txt svn diff -r2 topics_speakers/speakers.txt svn diff -r1 topics_speakers/speakers.txt svn diff -r1:3 topics_speakers/speakers.txt svn diff -r2:3 topics_speakers/speakers.txt # Checking Modifications, and discarding changes. echo "hello" >> attendees/attendance.txt svn status . svn diff attendees/attendance.txt svn revert attendees/attendance.txt svn status . svn diff attendees/attendance.txt # login to remote computer ssh some.computer.i.have.access.to # Check out the code (but set env.vars first) # gate1 requires ssh over port 1234: export SVN_SSH="ssh -p1234" export SVN_EDITOR=/usr/bin/vim # checkout: note the syntax is different to rsync and scp! svn co svn+ssh://jmackey@gate1.astro.uni-bonn.de/users/jmackey/temp_svn_repo_store/RobsTechnicalSeminar working_copy # edit a file cd working_copy/tech_seminar/attendees echo "random text" >> random_new_file.txt svn status . svn add random_new_file.txt svn status . svn status -u svn commit # logout and update local working copy. exit cd ~/working_copy svn update