Skip to content
Back to library
beginnerGit Fundamentals

Repository

The Definition

A repository is the complete collection of files and their entire revision history for a project.

Mental Model

"A repository is like a project folder with a built-in time machine. It contains your current files plus all previous versions, organized in a graph of commits."

Visual Simulation

Live Engine
PROJECT
.gitEngine

Watch Out (Common Pitfalls)

!

Initializing a repository inside another repository (nested git repos)

!

Forgetting to add a .gitignore file

!

Including build artifacts or dependencies in the repository

Hands-on Command

shell
~ $git init mkdir project && cd project && git init