2.1. Course Git Repository¶
All course materials (including this guide) are available as a private git repository stored on Andrew AFS. It is essential that you learn to use git well enough to checkout and update a copy of the course materials on your own computer, as the source code for the exercises is only available via that means. The course materials will also continue to change during the semester so I will periodically ask you to update your local copy to an up-to-date version.
2.1.1. Basics¶
Git is a software tool for version control which provides the means to track changes in a set of files over time and share them with other people.
I am using the Andrew general purpose unix server to serve the official upstream repository of the course materials to any user with a valid Andrew account. Your normal Andrew user ID and password will be required for access.
Students will not be pushing to this repository, although I welcome emailed bug reports documenting any errors.
There are many online tutorials related to git. Some good starting points follow:
Note that there are many different git clients available, ranging from the standard command line tools to visual GUI-based applications. Each has their merits; the visual interfaces are much more beginner-friendly, but some sophisticated operations are only possible from the command line, so many users will install both to use as needed.
The IDeATe cluster MacBook Pros should have three different git clients:
GitX.app GitX visual client for OS X /opt/local/bin/git command line client provided via MacPorts /usr/bin/git outdated command line client provided by Apple
Note the the Github Desktop GUI client is not recommended for use with this course as it is not hosted on github; GitX.app is suggested instead for OS X, and a suggested alternative under Windows is SourceTree with the SSH Client set to PuTTY/Plink.
2.1.2. Using the Course Repository¶
The first step is to clone the repository, which will create a local copy in a new folder on your local machine. If you are using a command line client, the command is follows, where AndrewID represents your own ID:
git clone AndrewID@unix.andrew.cmu.edu:/afs/andrew/usr/garthz/rcp-f15
This will create a new folder named rcp-f15
in the current folder. The
repository can be updated to the current version using pull, which will
fetch the upstream changes and merge them into the local copy:
cd rcp-f15
git pull
The cd command makes the repository folder current, and the git pull command performs the fetch and merge.
Note that if you have made incompatible changes, this may result in conflicts. Please refer to the git manual to learn how to create your own branches and resolve conflicts. The most common cause for this is modifying the course source files in-place. If you are not planning to keep your own revisions in version control, the recommended practice is to duplicate provided files before modifying them to minimize your trouble later.
This is a private repository, please do not repost to any public server outside the university.
2.1.3. SolidWorks Examples¶
We have an additional repository of sample CAD files for SolidWorks at PhysComp SolidWorks repository. This is not strictly required for the course but may be useful if you know or learn 3D CAD.
2.1.4. Advanced Usage¶
Experienced git users may know they can fork a personal copy of a repository and submit pull requests containing suggested patches. If we get to this point, this can be accomplished by cloning a copy into AFS folder readable by your instructor and emailing a pull request.