EruditeWBT Course Git Hands-On
Version control

Git is how you save work properly, not just how you upload code.

Git helps you track changes, explain what changed, undo mistakes more safely, and collaborate with other people. The goal on this page is simple: create a repo, make a change, commit it, and understand what just happened.

Mental model

What Git actually does

Working directory

The files you are editing right now.

Repository history

The recorded checkpoints of your work.

Simple formula Edit files -> check status -> add selected files -> commit with a message -> repeat.
Copy and run

Activity 1: Create your first repo

mkdir git-practice
cd git-practice
git init
echo "# Git Practice" > README.md
git status
git add README.md
git commit -m "Add initial README"
Success check After git commit, Git should tell you one file was committed.
If commit fails Set your name and email first:
git config --global user.name "Your Name"
git config --global user.email "you@example.com"
Core commands

The small Git set you should know first

See what changed

git status

Add files to the next commit

git add README.md
git add .

Save a checkpoint

git commit -m "Explain the change"
Do something real

Activity 2: Make a second commit

echo "This repo is for learning Git." >> README.md
git status
git add README.md
git commit -m "Add purpose line to README"
git log --oneline

You should now see at least two commits. That means you are already building a usable history.

What to do next