Using svn for this class

DJ has created the following svn repository for us:
https://repo.bowdoin.edu/svn/ltoma/csci3225fall2016/(account-name)
where (account-name) is one of:
agorman  bhalvors  ccarrera  jboyle    jtruskow  sbilling  wgantt
akim     bwent     gcarver   jlemkeme  mbustama  sngo
amilloy  calini    itumanen  jnawrock  rfreedma  wconover
For example,
https://repo.bowdoin.edu/svn/ltoma/csci3225fall2016/agorman
To start, go to your desired machine (for example, your laptop) and create a folder for the class:
[ltoma@lobster ~]$mkdir gis
[ltoma@lobster ~]$cd gis
To check out the folder go to the desired location (you are already there if you followed the instructions above), and type:
svn co https://repo.bowdoin.edu/svn/ltoma/csci3225fall2016/(account-name) 
(replace account-name by your userid as above)
For example:
[ltoma@lobster ~/gis]$svn co  https://repo.bowdoin.edu/svn/ltoma/csci3225fall2016/agorman
Checked out revision 2639.
[ltoma@lobster ~/gis]$ls
agorman
[ltoma@lobster ~/gis]$
This will create a clone agorman in the current directory. This is a clone or copy of the agorman folder on the server. First time the folder will be empty (cause you didn't put anything in it yet).
[ltoma@lobster ~]$cd agorman
[ltoma@lobster ~/agorman]$ls
[ltoma@lobster ~/agorman]$
Create a folder inside your group for each assignment
[ltoma@lobster ~/agorman]$mkdir p1_multgrid
[ltoma@lobster ~/agorman]$ls
p1_multgrid
[ltoma@lobster ~/agorman]$
[ltoma@lobster ~/agorman]$cd p1_multgrid/
[ltoma@lobster ~/agorman/p1_multgrid]$
Now you’ll want to copy some code in p1_multgrid. Below you can see how I copy the startup code. You need to change it so that you copy from wherever the most recent version of your code is.
[ltoma@lobster ~/gis/agorman/p1_multgrid]$cp  ~/Desktop/startupcode/* .
[ltoma@lobster ~/gis/agorman/p1_multgrid]$ls
Makefile
grid.h grid.c
viewPoints.c
[ltoma@lobster ~/gis/agorman/p1_multgrid]$
Great, now you got some code in your folder. Do an svn stat to see what the svn thinks about what files changed:
[ltoma@lobster ~/gis/agorman/p1_multgrid]$svn stat
?       p1_multgrid
This tells you p1_multgrid is not aded to svn. You have to add it:
svn add  p1_multgrid
Then commit:
svn ci -m "here is the startup code"
You will have to add new files as you create them. The svn should only contain header, source and make files, and not objects and executables.

Now you got the startup code in svn. From this point on, your basic routine will be: update, edit, commit. As you start your programming session, you first update your version of the code to the most recent version from the server

[ltoma@lobster ~/gis/agorman/p1_multgrid]svn up 
Next you code away, and at the end, you send your changes to the server:
[ltoma@lobster ~/gis/agorman/p1_multgrid]svn  ci -m "explain here what is different in the code you are checking in wrt the previous version"
The main thing to understand is that the code is saved on the server, and what you have on your computer is a local copy of the code on the server. You can have as many local copies as you want on as many computers as you want, and the other people in your team can have their own local copies. Each one of you will modify their own local copy, and they need to send their changes to the server; this is done via the command svn ci (svn terminology, stands for checkin); or push (git terminology). To grab the most recent version from the server, you need to pull (git terminology) or co (svn terminology, stands for checkout).

Hope this gives you sufficient details to get started with svn. Let me know if you encounter any problems! In time you will see that svn is incredibly helpful and you will become addicted.


Last modified: Tue Sep 6 17:36:35 EDT 2016