Initial Setup
We will be using Github Classroom for this course. Please follow these instructions to set up Git and Github Classroom
Run through first-time setup to set up Git on the Linux machines.
Make a Github account with your Trinity email address.
I suggest your account name should be your Trinity ID (i.e. sfogarty).
You must set up a Github SSH key. There are tutorials for each step:
Check if you have an SSH key on the Linux machines.
If you don't have a key, generate one.
Github suggests using a passphrase and ssh-agent. I simply left the passphrase bank.
Adding the key to Github.
The Linux machines do not have clip.
You will need to use cat ~/.ssh/id_rsa.pub instead, and copy the output the old-fashioned way: selecting it.
While logged in to that account, click on the project link to create your own repository with initial code.
I recommend the Git SCM tutorial, found at http://git-scm.com/book
On the github page for the repository, click on the green Clone or download button.
I recommend using "Clone with SSH."
If the box reads "Clone with HTTPS", click "Use SSH."
If that is not available, set up your SSH key.
Click the copy button next to the link.
To clone your repository into the directory, use
git clone <link>
When you begin working, you should update the repository with any changes made by typing
git pull
To add a new file, or to stage a file you have changed, use:
git add <filename>
You should never add generated files, such as executable or object files, to your repository.
I recommend adding lib/* and bin/* to your .gitignore
You can commit changes to your local repository without pushing them to the repository server. Commit staged files with
git commit
Alternately, you can commit all changed files and specify the message (no punctuation allowed!) with
git commit -a -m "Update"
When the coded is in a good state, such that it compiles, it's a good idea to push your changes back to Github. Use:
git push
This uploads all changes so course staff can see them.