Git for Beginners

Understanding version control in plain language.


What is Git?

Git is version control - it saves the history of all changes to files.

Think of it like "Track Changes" in Word or "Version History" in Google Docs, but for code.


Why Use Git?

Undo mistakes - Go back to any previous version ✅ Collaborate - Multiple people can work at once ✅ Track changes - See who changed what and when ✅ Backup - All history is saved


Key Concepts

Repository (Repo)

The project folder with all files and history.

Commit

A saved snapshot of changes. Like a save point in a video game.

Branch

A separate workspace for making changes. Like working on a copy.

Push

Upload your commits to GitHub (the cloud).

Pull

Download changes from GitHub to your computer.

Main

The live version of the site that visitors see.


The Git Workflow

  1. Make changes (edit files)
  2. Stage (select what to save)
  3. Commit (save a snapshot)
  4. Push (upload to GitHub)

Git is Like Google Docs

Google DocsGit
Edit documentEdit files
Auto-saveManual save (commit)
Version historyGit history
SharePush to GitHub
DownloadPull from GitHub

Next Steps