|
|
Line 1: |
Line 1: |
− | '''I think I have this updated for Fall 2015 and the new SVN organization being set up by EIT. Let me know if you find problems.)
| + | This year, our labs are hosted on [[https://bitbucket.org | bitbucket]], which is a version control system that uses [[https://bitbucket.org | git]]. If you are not familiar with git, [[https://www.learnenough.com/git-tutorial | here is a reasonably good tutorial]] on how it works and how to use it. It is written for Unix/Linux and from a command line perspective, but should provide you with a good overview of what git does and how to use it. |
− | '''
| |
| | | |
− | An svn repository has been setup for each student on svn.seas.wustl.edu. These will be used in connection with labs and studios, including to submit your lab assignments. SVN is an open-source [http://svnbook.red-bean.com/ version control system] that allows multiple users working on a common set of files to synchronize through a server (the repository). Repositories can be accessed using any of a number of svn clients. SVN clients come native on most Unix distributions including MAC OSX and Linux. There are also a number of GUI-based SVN clients for Windows, the MAC and Linux. On Windows, [http://www.tortoisesvn.net TortoiseSvn] is a nice client that is available on the Urbauer labs machines.
| + | For those who are familiar with svn, another version control software, the two are very similar when it comes to the steps involved in getting stuff from and to the remote repository that will be used to both get lab assignments and submitting your solutions. The main difference between the two is that while svn only requires a <span style="font-family:Courier;">commit</span> operation, git requires a three step process (see Figure 4 of the [[https://www.learnenough.com/git-tutorial | tutorial]]), namely ''stage'' (this uses make a new or modified file ready to be committed), ''commit'' ( |
− | | |
− | The first time you use your SVN client to access a repository, you need to first "checkout" a local copy of the repository on your machine.
| |
− | | |
− | To checkout a working copy of the CSE 473 labs repository on a unix/linux system, type the following within a shell window. (These instructions assume that svn is installed on your computer - if not, you can download it from the subversion web site - http://subversion.apache.org/).
| |
− | | |
− | svn checkout https:/svn.seas.wustl.edu/repositories/<wustlkey>/cse473s_fl15/
| |
− | | |
− | You should substitute your own WUSTL Connect Key login name in place of "yourConnectKey".
| |
− | | |
− | You will be prompted for a password. Use your Connect Key password. Once you have checked out a copy of your repository, you will see a new directory (folder) with the same name as your repository. Do a cd to this directory and take note of the various files and sub-directories that now appear there.
| |
− | | |
− | If you are using TortoiseSvn on a Windows PC, open Windows explorer and create a new folder in an appropriate location (or use an existing folder, if you already have one where you want to download the repository to). Right-click within the empty folder to bring up a "context menu", which should include an SVN checkout menu item. Selecting this will bring up a dialog box in which you can enter the URL for your repository. This takes the form
| |
− | | |
− | https://svn.seas.wustl.edu/repositories/<wustlkey>/cse473s_fl15/ | |
− | | |
− | Proceed as described above.
| |
− | | |
− | There are two basic functions to svn: '''update''' and '''commit''', which synchronize your local copy with the repository.<br>
| |
− | The '''update''' command (''svn update'' from command line) downloads into your local copy any file for which the repository has a newer version. If you do not specify an individual file name, it recursively checks for modified files "downward" (in the file system) from where you invoked the command. If you invoke the command at the roor of the repository, it will check for updated files in the entire repository. Asking the repository for an updated copy of an individual file simply requires appending its name after the command, i.e., ''svn update filename'' (or selecting if from the GUI menu).<br>
| |
− | The '''commit''' command (''svn commit'' from command line) uploads back to the repository files that you have been modifying. Again, if you do not specify any file name, it recursively uploads any modified versioned file. This allows others to download them (with the update command). Again, you can ask to commit a single file by appending its name after the command i.e., ''svn commit filename'' (or selecting if from the GUI menu). Note that when you commit a file, you will usually be asked to enter a short description of the changes you have made. You can bypass this (from command line) using the "-m" option and adding a short blurb of text between quotation marks, i.e., svn commit -m "text" filename (optional).
| |
− | | |
− | The other command you will need to use is the '''add''' command, ''svn add'', which as its name indicates will identify that a new file needs to be added to the repository, i.e., be versioned. It can be applied to either a directory or a specific file. Many GUIs actually give the option to add an entire new directory and its content in one operation, or for existing directories to check for "unversioned" files, i.e., files that have not yet been added, and select them all.<br>
| |
− | '''NOTE''': After you have added a file to the repository, you still need to issue a '''commit''' command to have it actually uploaded to the repository, i.e., it is a two-step process (again, some client allow you to combine the add and commit operation).
| |
This year, our labs are hosted on [| bitbucket], which is a version control system that uses [| git]. If you are not familiar with git, [| here is a reasonably good tutorial] on how it works and how to use it. It is written for Unix/Linux and from a command line perspective, but should provide you with a good overview of what git does and how to use it.
For those who are familiar with svn, another version control software, the two are very similar when it comes to the steps involved in getting stuff from and to the remote repository that will be used to both get lab assignments and submitting your solutions. The main difference between the two is that while svn only requires a commit operation, git requires a three step process (see Figure 4 of the [| tutorial]), namely stage (this uses make a new or modified file ready to be committed), commit (