Understanding Git and GitHub: A Developer’s Time Machine

Understanding Git and GitHub: A Developer’s Time Machine

Introduction

Think back to the early days of working with Microsoft Word. You’d type a document, make edits, and save it. But once you saved, the previous version was gone—you couldn’t track changes over time, then there was gradual improvement where now, to some extent, you can collaborate with others. Some of us used this collaborative feature while doing our undergraduate project, which made it easy for our project supervisors to make corrections, and we either accepted or rejected track changes.

So recently, I have been working with Google Docs more because Microsoft 365 expired. Then I discovered something recently, and those features are also in Google Docs: automatic saves and version history, allowing users to see past changes, compare versions, and even restore an older one. Now, imagine this same concept applied to coding—where every change is tracked, every version is saved, and collaboration is seamless. That’s where Git and GitHub come in.

Git: Your Personal Time Machine

Git is a Version Control System (VCS) that helps developers track changes in their code, just like version history in documents. With Git, you can:

  • Save different versions of your project

  • Revert to an earlier version if something breaks

  • Work on new features without affecting the main project

Think of Git as your personal library, where you store all your books (code files) while keeping track of every edit.

GitHub: The Public Library for Collaboration

Now, what if you want to share your books with others so they can review or improve them? You send them to a public library, right? That’s exactly what GitHub does. It is an online platform where developers store, collaborate, and manage code using Git. With GitHub, you can:

  • Work with a team on the same project

  • Track contributions from different developers

  • Store and access your projects from anywhere

Key Git Terms You Need to Know

  • Repository (Repo) – A folder where your project and all its versions are stored

  • Commit – A snapshot of your project at a certain point

  • Branch – A separate version of your project for testing new features

  • Merge – Combining different branches into one

  • Pull & Push – Syncing your work with GitHub

Why Git Matters for Developers

Imagine working on a big project, and a client asks you to revert to an earlier version of your code. Without Git, you might have to start from scratch. But with Git, you can time-travel back to any previous version effortlessly!

💡
Let’s Discuss!

Have you used Git or GitHub before?

What challenges did you face while learning version control?

Drop your thoughts in the comments! Let’s learn together.