Repo

A repository (or repo for short) is a unit building block for Git. A repo to a project is like a cell to an organism.

  • You can have one repo, working on your own (e.g. single-cell animal) or

  • multiple repos that different people are working on, but keep inter-communicating (e.g. bateria transfer DNA materials using plasmids)

A repo extends the concept of a folder (i.e. a working directory, which you typically view in a file explorer). There are actually three main components in a repo (often known as three trees, the working directory being one of them). More on this later.

Git stores the tracking information in a folder named.git. It contains all the previous histories of code edit. Having the .git folder signifies that the parent folder is a Git repo.

You don't need to manually interact with the .git folder. Everything should be via Git commands.

Note that files or folders starting with a dot are hidden on Linux. You need to use ls -a to explicitly list all items.

Last updated