What is a repository (repo)?
A repository, or repo, is a project's folder plus its full history of saved changes, kept by a tool like Git so you can see or restore any version.
Last updated
In real life
Like a photo album of your project: every page is a saved moment, in order, and you can flip back to any of them.
Try it yourself
The demo shows the history of a made-up bakery site's repository, newest commit first. Make changes and commit them, and each commit joins the list. Roll back to any earlier commit, and the roll-back is saved as a new commit too.
Your working copy (branch: main)
Rosa's Bakery
Order nowMake a change
History of the rosas-bakery repository (1 commit)
This lesson- a1f3c9 First version
Branches
A branch is a safe copy to try an idea on.
The repository is the project plus its whole history. Every commit is kept, so you can always see or return to an earlier version.
Repository vs folder
A folder only holds the files as they are now. A repository holds the files plus every saved version, so you can see what changed, when, and go back.
Common questions
Where do repositories live?
On your computer, and usually as a copy online too, on a site like GitHub or GitLab. The online copy is a backup and lets others work on the same project.
Can a repository be private?
Yes. On GitHub and similar sites you choose public, which anyone can see, or private, which only people you invite can see.
Where you will use this
Quick check: Repository
Question 1 of 3