[Git Series Part 1] What is Git?

한국어 버전

What is Git?

When you write a report, you often end up with filenames like report_v1.docx, report_v2.docx, report_final.docx, and report_final_realfinal.docx. Git is a version control tool that replaces that file-copying mess with a clean history of changes.

What We Will Do

  • Experience the pain of managing versions through filenames
  • Learn four core problems Git solves
  • Understand how Git and GitHub differ

A Tiny Mental Model First

Before we look at commands, keep these two ideas in mind:

  • A repository is your project folder plus Git's hidden history.
  • A commit is one saved snapshot with a message explaining what changed.

You do not need to memorize the terms yet. For this post, just think of Git as a tool that remembers the story of your project.

Why This Tool Matters

Feel the versioning problem

You are writing a report:

report_v1.docx
report_v2.docx
report_final.docx
report_final_real.docx
report_final_real_final.docx
report_final_final_final.docx

Pain points:

  • No idea which file is the latest
  • Hard to roll back to an earlier version
  • Cannot remember what changed between versions
  • Sharing files with teammates is clumsy and risky

The same issue in code

# calculator_v1.py
def add(a, b):
    return a + b

# calculator_v2.py
def add(a, b):
    return a + b

def subtract(a, b):
    return a - b

# calculator_final.py
# ...?

If you copy the entire file every time you add a feature:

  • You forget which file is the true final version
  • When a bug appears after adding subtraction, you cannot easily go back to the “addition only” version
  • In a team, nobody knows who changed which file

One Project, Two Ways to Work

Imagine you are building one small calculator app.

Without Git, your folder fills up with renamed copies such as calculator_v1.py, calculator_v2.py, and calculator_final.py.

With Git, you usually keep one real project folder and let Git track the earlier states for you. That is why the commands below matter: they help you look through history without creating more duplicate files.

What Git Actually Gives You

Problems Git Solves

1. Version history

View change history zsh · ~/workspace
Ready. Press Replay to run the scripted session.

git log --oneline shows a short history of commits. The left side is the commit ID, and the message on the right is the note you wrote when you saved that version.

You can see what changed over time without guessing from filenames.

2. Inspect an older snapshot safely

Inspect an older version safely zsh · ~/workspace
Ready. Press Replay to run the scripted session.

If you want to check an older version, git show lets you inspect it without changing your current files.

3. Inspect changes

Compare changed code zsh · ~/workspace
Ready. Press Replay to run the scripted session.

git diff shows exactly what was added or removed, so you do not have to compare whole files by eye.

4. Share work without losing track

Preview collaboration flow zsh · ~/workspace
Ready. Press Replay to run the scripted session.

When you work with other people, Git helps everyone exchange changes through shared history instead of sending around renamed files.

If two people touch the same part of a file, Git does not silently hide the problem. It tells you there is a conflict so you can fix it on purpose. That is what makes collaboration safer.

What Changes When You Use Git

Git vs GitHub

Git GitHub
Local version control tool Hosting service for Git repositories
Needs installation Requires a website account
Runs on your computer Accessed over the internet
Command-line based Web UI + Git

Git works on your own computer even if you never create a GitHub account.

Use Git when you want local version history. Use GitHub when you want to back up a repository online, share it with teammates, or publish your work.

Before vs after Git

Situation Before Git After Git
File backup Multiple manual copies git commit once
Check an older version Manually find old files git show or git log
Change log Rely on memory git log shows everything
Collaboration Email/drive file exchanges git push/pull keeps everyone in sync

Who Should Use Git

  • Developers who want safe version control
  • Students doing team projects
  • Anyone tired of final_final filenames
  • People who want to show clean project history in a portfolio

Quick Recap

Question Answer
What is Git? A version control tool
Why do I need it? File-based versioning is confusing and risky
What is GitHub? A website that hosts Git repositories
Is it hard? No. A few core commands are enough to begin.

Core advantages of Git:

  1. Safe – You can recover even after you delete something
  2. Transparent – You know who changed what and when
  3. Collaborative – Many people can work simultaneously

Next in the Series

Now that you understand why Git is necessary, let’s install it and configure your user info.

Git Series Part 2: Install and Configure walks through installation plus user setup with real commands.


Practice Checklist

  • Understand the problems with filename-based versioning
  • Know the four problems Git solves
  • Understand the difference between Git and GitHub

💬 댓글

이 글에 대한 의견을 남겨주세요