Skip to content

Homework 03

originalgremlin edited this page Nov 1, 2012 · 3 revisions

Due 2012/11/05

Part 1: Continue Learning Git

30 minutes

While I don't want you to become too focused on git, we do have to learn it if we're to become an effective distributed development team. Git is a useful tool in every programmer's toolbox. But it's just another tool, not a goal in itself. With time and practice using git will help you achieve the real purpose of programming: making cool programs.

We've already practiced:

  1. cloning a repository
    git clone <repo url>
  2. listing existing branches
    git branch
  3. creating a new branch
    git branch <branch name>
  4. switch to a new active branch
    git checkout <branch name>

This week we'll learn how to edit existing files and publish our changes.

  1. Switch to the coming-soon branch.
    git checkout coming-soon
  2. Download all the latest code from the remote repository.
    git pull origin coming-soon
  3. Open the file my_first_push.txt in your favorite text editor.
  4. Add your name to the bottom of the file.
  5. Save the file.
  6. What if somebody changed the file in the last 10 seconds? With distributed teams this is very possible. To be safe, we usually try to download any recent changes just before uploading our own.
    git pull origin coming-soon
  7. Tell git about your changes.
    git add my_first_push.txt
  8. Verify that everything is correct. You should see my_first_push.txt listed as a changed file.
    git status
  9. Save your changes locally with an informative message so everybody knows just what changed.
    git commit -m "Added my name."
  10. Upload your local changes to the remote server so your classmates can see them.
    git push origin coming-soon

Part 2: Continue Practicing JavaScript

1 hour

Continue your lessons on Code Academy. Spend at least another hour going through the activities.

Part 3: Being Reading JavaScript: The Good Parts

1.5 hours

Download these books and read the first 3 chapters of JavaScript: The Good Parts. Along with online documentation, these will form the core references for this class.

Clone this wiki locally