Working in CLAC is the normal and recommended way to do your labs in this class. This guide is not necessary by any means. In fact, if you choose to work on your own machine, you are on your own. We do not support it. You cannot claim “it worked on my machine” when your lab didn’t compile on CLAC. (That’s actually the main reason we have CLAC.) This method is also recommended only for those who are very comfortable with Git.
First, you must SSH into CLAC and configure Git so that you can push from your local machine to CLAC. You can set this up using the following command:
git config --global receive.denyCurrentBranch updateInstead
You only need to perform this step once. Failure to perform this step will
result in errors when running
git push on your local machine.
After that, clone the lab to your CLAC account as usual. Then, on your local machine you can clone your lab repository using the following command:
git clone UNI@clac.cs.columbia.edu:~/cs3157/labN ~/local/path
You can now work on your local machine. When you’re done, push to the CLAC
Git repo using
git push. Then, you submit from your Git repo on CLAC.
The caveat here is that you must keep the two repositories in sync: the
easiest way to do this is to always commit and push from your local machine
If the repository on CLAC is ahead of your local machine in commits, or if you
have untracked or uncommitted changes on CLAC,
git push will fail on your
Also note that you will not be able to push from CLAC to your local machine using this method. This will only work in one direction (from your local machine to CLAC). These steps do not configure your local machine to receive pushes, and the Git repository on CLAC will not know where to push to.
This guide was originally written by Nelson Gomez, Jae Woo Lee, and Kundan Guha.
Ivy Basseches, Tal Zussman, and John Hui adapted it for the web in Fall 2022.
Last updated: 2022-09-14