Skip to content
BENIBIX Learn

Repository

Development🔀 Version ControlGit Basics

Also known as Repo, Git Repository

A project folder. It also keeps a full record of each change ever made.

Think of it like

Think of it like a box for a project. It also holds a diary of each change.

Example

Emma runs git init in her shop folder. The folder is now a repository, and Git starts keeping track of it.

Why it matters

The repo is the home of a project. Everything Git does happens inside one.

Definition

A repository, or repo, is a project folder that Git is tracking. It holds the project's files plus a hidden folder named .git with the full history. Each person on a team has their own copy of the repo. There is often also a shared copy online, on a site like GitHub or GitLab. You create one with git init or copy one with git clone.

Example code

console
$ git init shop
Initialized empty Git repository in /home/ada/shop/.git/
One command turns a plain folder into a repo.

Common mistake

Deleting the hidden .git folder. That wipes out all the past and leaves just the files.

Key takeaways

  1. 1
    Files plus history. The past lives in the .git folder.
  2. 2
    Many copies. Each person has a full repo.
  3. 3
    Start or copy. Use git init or git clone.

Learn it properly