Git Version Control

Git is the most important tool every developer uses to track changes in their code and work safely with others.

Think of Git as a "save button with superpowers." It remembers every change you make, lets you go back to any previous version, and makes teamwork smooth.

Why Learn Git Early?

Almost every real project uses Git. Whether you’re building a simple website, a mobile app, or contributing to open source, Git helps you avoid losing work and makes sharing code easy.

It’s one of the first skills employers and collaborators look for. The good news? You can learn the basics in a single afternoon.

What is Git?

Git is a free version control system created by Linus Torvalds. It tracks every change to your files and folders.

Popular platforms that work with Git include:

  • GitHub — the most widely used platform for hosting projects and collaborating.
  • GitLab — great for teams and offers built-in CI/CD tools.
  • Bitbucket — popular with companies that use Jira.

Core Git Concepts

Repository (Repo)

A folder that Git is watching. It can live on your computer (local) or online on GitHub, GitLab, or Bitbucket (remote).

Commit

A snapshot of your project at a specific moment. Every commit has a short message describing what changed.

Branch

A parallel version of your code. You can create a new branch to test ideas without breaking your main project.

Push & Pull

Push sends your commits to the online repository (like GitHub). Pull brings the latest changes from others down to your computer.

Getting Started with Git

Install Git from git-scm.com (it works on Windows, Mac, and Linux).

Then create your first repository:

git init
git add .
git commit -m "First commit"

After your first commits, connect your local repo to GitHub (or GitLab) and push your code so it’s safely backed up online and easy to share.

Next Steps

Practice by creating a small project in your Live Coding section and putting it under Git control. Learn basic commands like git status, git log, and git branch.

Once you’re comfortable, try cloning a public repository from GitHub and making small changes.

Git (and platforms like GitHub and GitLab) is a skill that grows with you — start simple, and it will quickly become second nature.