Beginner · 6 min · practise every command in the built-in terminal

Git — Version Control

Git tracks changes to files over time, so you can see history, undo mistakes, and collaborate without overwriting each other's work.

Check if Git is installed

git --version

Configure your identity (one-time)

git config --global user.name "Your Name"
git config --global user.email "you@example.com"

Create a repository

mkdir myproject
cd myproject
git init

This creates a hidden .git folder — that's where all the history lives.

Check the state of your repo

git status

Shows which files are tracked, untracked, staged, or modified. You'll use this constantly.

The three areas of Git

Working directory  →  Staging area  →  Repository (commits)
     (edit)              (add)            (commit)

Practice tasks

  1. Initialize a new Git repository
  2. Check the status of your repository
  3. Configure your git identity
  4. Check the installed git version

Commands in this lesson

Git & Version Control