Fetching new files from our repository
We will usually give you new stubs and files for each lab. Instead of sending you the files and letting you merge them within your repository, we will use the machinery provided by git to do this.
We provide you with instructions on how to do that in the command-line (and alternatively in Eclipse if you have your git repository set up there):
Pulling from the Command Line
Setting the upstream remote branch
This operation sets a remote branch pointing to the main repository, files will be distributed through this main repository:
git remote add upstream email@example.com:cc2013-main
This operation needs to be performed only once for your local git repository.
Pulling new changes
Once the remote branch is set up, simply pull the new changes from that branch into your working branch (typically master):
git pull upstream master
If you experience conflicts during the merge, fix the files by hand, then git add them and finally git commit the changes to resolve the conflicts.
In case you fear pulling will result in a lot of conflicts, feel free to look at the code as it is on the main repository, by e.g. cloning it.
git clone firstname.lastname@example.org:cc2013-main
Alternative: Pulling within Eclipse
- Right click on the toolc project, got to Team .. Remote .. Fetch From…
- Select Custom URI
- As URI, use ssh://email@example.com/cc2013-main
- Click Next
- Select “master” as Source ref and “choose_remote_name/master” as Desination ref, click Add Spec
- Click Finish
The commits and changes should have been merged into your repository.