CSCI 102T
The Socio-Techno Web
Home | Schedule | Labs | CS@Williams
Lab 1: Intro to Git and Workflow
In this lab, we will explore tools, techniques, and workflows used by
many programmers. We will adopt some of these best practices and use
them for managing our written and lab assignments, collaborating, and
exchanging feedback.
The skills developed in this lab will help us on multiple fronts.
The tools that we explore (Terminal.app, the Atom text editor)
and the workflow we use (checkpointing our progress using the Git version control system)
will help us to work efficiently, safely, and collaboratively throughout the semester.
In the next lab, we will begin creating a webpage that will
ultimately be the home for all of our lab and written assignments.
We will continue to use these tools and this workflow for the rest of
the semester.
Step 0: Lab Preparation
Please complete Step 0 before entering lab.
Step 1: Forking
Navigate to the CS102 GitHub
starter repository. Fork the
repository by using the Fork button in the top right-hand
corner. This copies the repository to your GitHub account.
Now that you have created your own private version of the repository (it is not part of the Williams CS GitHub organization), let's change your repository's name.
Step 2: Cloning
You should now have a copy of the repository in your own GitHub account. Clone the repository to your local disk using the following steps.
$ cd
$ mkdir cs102If you open up Finder, you should see a new folder called cs102 appear in your home directory!
$ cd cs102
$ git clone https://github.com/<git-username>/cs102-lab1.git(It will prompt you for your username, and then for your password)
$ cd cs102-lab1
Step 3: Text Editors
There are many good text editors. People swear by emacs and vim. In a pinch, you can also use nano. Currently, many people like sublime. The last time this course was taught, everyone used TextWranger. Despite all of those wonderful options, today we will use Atom (but in the future feel free to use whatever you want).
Step 4: Submitting Code
We will use Git and GitHub for submitting lab assignments. We will also GitHub to share our websites with our tutorial partners.
$ git commit -m "Updated my repository's Readme" README.mdWhat this command does is tell the git program that you want to commit the current state of some files in your repository. The -m option tells git that you want to add a message to your project's history to help you to log notes about the changes you made. You put the message inside of quotes. Only the files that are listed after the message will be committed.
$ git push
https://github.com/<git-username>/cs102-lab1You should see your changes reflected in the README.md file displayed there.