Git & GitHub: Your Time Machine for Code

What you’ll learn in this module

This module introduces Git and GitHub, your tools for tracking code changes and collaborating.

You’ll learn:

  • Why version control matters through real-world disasters.
  • How Git saves snapshots of your work like a time machine.
  • How to use GitHub to backup your code and work with others.

The Day the Code Disappeared

Picture this: you’re working late on a project, and you finally fix a major bug. Your fingers are on the keyboard when you suddenly delete a line by accident, then save. You go home.

The next morning, you open your laptop and realize all your work from yesterday is gone. The bug fix vanished. You have no idea what you did to fix it, and you have to start from scratch.

Even big companies get it wrong. In 2017, GitLab, a major code hosting platform, suffered a catastrophic outage. A system administrator accidentally deleted massive amounts of production data.

The backups didn’t work. The company lost six hours of customer data. That’s a lifetime in the software world. The details are uncomfortable reading. Check out the GitLab post-mortem if you want to see what went wrong.

Let’s Talk About Version Control

Version control is essential for any data-related work. A version control system (VCS) saves “snapshots” of your files. Think of it as a time machine: you can travel back to any snapshot and see exactly what your code looked like at that moment.

The most popular VCS today is Git. When you put Git in the cloud (like on GitHub), something magical happens. You can access your work from anywhere, share it with teammates, and back it up automatically.

Why does this matter so much? Because code changes constantly. You fix one bug and create another. You experiment with new features that don’t work out. Without version control, you’re always one mistake away from losing everything.

Here’s a quick intro video to get you oriented:

Where to Start Learning

The best way to learn Git is by doing. Start with A Layman’s Introduction to Git for a readable overview. Then move to the Interactive Git Tutorial, which teaches Git visually through interactive exercises.

What if you want deeper documentation? The Git Documentation provides comprehensive coverage of every feature. The Atlassian Git Tutorials offer detailed examples with clear explanations.

Here’s a practical tip. If you’re just starting out, use GitHub Desktop instead of the command line. It gives you a graphical interface that makes Git concepts visible.

You can see branches, commits, and changes in a way that’s much easier to understand than terminal output. The GitHub Desktop Documentation walks you through the basics.