CS 70

Version Control

A CS70 Horror Story

  • LHS Cow speaking

    Settle in, for today we've got a scary story in CS70.

  • RHS Cow speaking

    Yes! I love stories!

  • LHS Cow speaking

    It was a dark and stormy night, and I had a big essay due soon. I knew I should get started.

Finder window with one file in it.

  • LHS Cow speaking

    I finished the part that I had to turn in the next day, but by then, I was on a roll! I decided to make a copy of the version I would turn in to my teacher so that I could keep going..

Finder window with one file in it.

  • LHS Cow speaking

    I was doing so great that I finished everything that was due the _next_day, too! I made a copy of the second draft, and kept writing away…

Finder window with one file in it.

  • LHS Cow speaking

    That's when things started to go south. I was almost finished with the whole thing when Elsa called.

  • RHS Cow speaking

    Hey! I thought we were friends?

  • LHS Cow speaking

    Oh… I mean… we are. It's just… things got messy with my essay after that.

Finder window with one file in it.

  • LHS Cow speaking

    When I got off the phone, I realized the essay I thought was almost done was really far from it. So I went back and made a bunch of changes. I wasn't completely sure I would like those changes, though, so I decided to keep them both around…

  • Hedgehog speaking

    Uh oh…

Finder window with one file in it.

  • LHS Cow speaking

    More (maybe?) great ideas, more versions of my essay…

Finder window with one file in it.

  • LHS Cow speaking

    I kept going…

Finder window with one file in it.

  • LHS Cow speaking

    And going…

Finder window with one file in it.

  • LHS Cow speaking

    By the time the essay was actually due, and I went back to print it, I couldn't even figure out which version was the best one!

  • Hedgehog speaking

    AAAHHHHH!!!!

Finder window with one file in it.

  • LHS Cow speaking

    One thing was clear…

  • Duck speaking

    That you should have gone to bed way earlier that night?

  • LHS Cow speaking

    Well, yeah. And that I needed a better way to keep track of my work.

Enter Our Hero: Version Control!

Version control tools let us keep track of all the different versions of our files, without having them clutter up our workspace. That makes it easier to stay organized, and to find the right version of our code. Knowing what was changed, and by who, is especially important when you work on large projects with others!

The version control tool you will use on your computer this semester is called git. We also use a website called GitHub to have a shared, web-accessible place to put copies of everyone's repositories.

Here's what's going on when you use git and GitHub:

Changed Files and GitHub Repos

If you change a file on your computer, which of the following do you need to do before the changes will show up on GitHub?

(When logged in, completion status appears here.)