LESSON 4
Repositories
Learning objective: Create a Git repository for a project.
Understand
A repository (repo) is a project folder that Git tracks.
Run git init inside a project folder to start tracking it. This creates a hidden .git folder that stores the history. Use git status often to see what Git sees.
Analogy: A repository is like a project folder with a built-in logbook.
See It in Action
Starting a repo:
git init
git statusHow it works:
git init begins tracking the folder, and git status shows the current state of your files.Try It Yourself
- Create a new folder for a project.
- Run
git initinside it. - Run
git statusto see untracked files.
Quick Quiz
What does git init do?
Challenge
Initialize a repository in a new project folder and check its status.
Success condition: Your folder is a Git repository and git status runs.
+10 XP
Lesson Complete
You answered correctly and completed the required practice. Your progress has been saved on this device.
Continue to next lesson →