Powered by Google Translate
Level 1 — Start from Zero · Chapter 1 of 50

Git & GitHub: What version control solves

A practical lesson on what version control solves. Understand the task, use a safe example, inspect its output, and complete a small project.

Chapter 1 / 50 Self-paced reading Independent instruction
Educational independence, trademarks & examples

EasyTutorGuide.com offers independent educational tutorials. Git & GitHub and other software or service names are used descriptively to identify the technologies taught; product names and trademarks remain with their respective owners. This is not official vendor training or a claim of endorsement. Demonstrations are written for authorized learning environments, and output for remote/cloud tools is illustrative unless separately tested. Check current product documentation and pricing before using a live account. Machine translation may contain errors.

Legal notice · Terms · Privacy

What you will learn

  • A repository is a project folder whose changes Git tracks.
  • The working tree contains the actual files you edit.
  • Staging chooses what enters the next saved snapshot.

What version control solves

When you edit the same project over several days, it becomes surprisingly easy to lose a working version. Sending files named final, final-new, and final-really-final does not solve that problem. Git stores checkpoints called commits so you can inspect what changed and return to a known state. You begin with a folder on your own computer; no GitHub account is needed for the first exercises. We will create a small learning journal, save its first version, and inspect the history. By the end, you will know exactly what Git has recorded and what remains unsaved.

  • A repository is a project folder whose changes Git tracks.
  • The working tree contains the actual files you edit.
  • Staging chooses what enters the next saved snapshot.
  • A commit records that staged snapshot with a useful message.
  • GitHub is a remote hosting service; Git itself works locally without GitHub.

Words you need

A

A repository is a project folder whose changes Git tracks.

The

The working tree contains the actual files you edit.

Staging

Staging chooses what enters the next saved snapshot.

A

A commit records that staged snapshot with a useful message.

Examples

Example 1

Create an empty learning repository

mkdir etg-journal && cd etg-journal
git init
Output
Initialized empty Git repository in .../etg-journal/.git/

Explanation: Git creates hidden repository metadata. It does not automatically add or save files.

Example 2

Write a note and stage it

printf "Today I learned how commits work.\n" > notes.txt
git add notes.txt
git status --short
Output
A  notes.txt

Explanation: The A in the first column tells you notes.txt is staged. The file is ready for a commit but is not saved in history yet.

Example 3

Save and inspect your first checkpoint

git -c user.name="Demo Learner" -c user.email="learner@example.invalid" commit -m "Add first learning note"
git log -1 --oneline
Output
abc1234 Add first learning note

Explanation: The exact commit ID will be different. The log proves that the snapshot is recorded in the repository history.

Practical chapter project

Build and verify

Create a three-entry learning journal, commit each entry separately, and show the final three entries with git log --oneline.

How to check the result

Record your actual starting state and the visible final result. If a service account is needed, confirm permission and cost protection first. Your project meets the target when someone else can repeat it safely and see the intended outcome.

Check your understanding

01 Does Git require a GitHub account?

No. Local repositories, commits and history work without a remote hosting account.

02 What is the difference between staging and committing?

Staging selects changes; committing records the staged snapshot in history.

03 Why use a clear commit message?

It explains the purpose of a saved change to your future self and collaborators.

04 Where does Git store repository history?

Inside the hidden .git directory of the local repository.

Summary

A repository is a project folder whose changes Git tracks. The working tree contains the actual files you edit. Complete the chapter project before opening Chapter 2.

Continue learningBuild Git & GitHub Interpreter and Installation

Keep learning

Try the examples, complete the project, review the questions, and continue to the next lesson.

Explore all EasyTutorGuide courses