What is a repository in Git?

A repository (or repo) is a project folder which Git tracks. It contains your files and the full history of all changes. The history is stored in a hidden folder named .git, which Git creates with git init or git clone.

  • Local repository: the one on your computer.
  • Remote repository: a copy on a server such as GitHub or GitLab.
  • Bare repository: a repository without working files, used on servers (git init --bare).

See Git Init.


Learn more about the similar topics:
Tutorials
Git Introduction
Version Control System
Install Git
Git Configuration
Git Workflow
Git SSH Key
Git and GitHub
Exercises & Assignments
Create a Git repository and make your first commit
Interview Questions & Answers
What is Git?
Why SSH key is used in Git?
How to create SSH key and use for GitLab?
What is the difference between Git and GitHub?
What is a repository in Git?