Version Control

repository

A repository — 'repo' for short — is your project's folder, but with git watching over it. Alongside your files, it quietly stores the project's entire history: every saved version, who changed what, and why.

A repo can live in two places at once. There's the copy on your own machine (the 'local' repo, where you actually work), and often a copy on a service like GitHub (the 'remote' repo, where the team shares and backs things up). You sync between them as you go.

Turning a plain folder into a repo is a one-time step: run git init, and from then on git tracks everything inside. That hidden .git folder it creates is where all the history lives — leave it alone and let git do its thing.

$ git clone https://github.com/torvalds/linux.git
$ cd linux

Clone copies a whole remote repo — full history and all — down to your machine.

A repo is just one project. Don't dump unrelated projects into one — give each its own.

Also called
repogit repocodebase