Search notes:

Git Repository

A git repository is a tree whose nodes are commits.
A repository is a collection of refs together with an object database, possibly accompanied by metadata from one or more porcelains.
A repository can share an object database with other repositories via alternates mechanism.

Creating a repository

A repository is created with git init.
Accordingly, git's answer to git init repo-name is
Initialized empty Git repository in path/to/repo-name/.git.

Bare repositories

A bare repository is mostly the same as the .git directory.
The files of the repository are not locally checked out. That is: the files normally found in the .git subdirectory are found in repository-name.git.
Bare repositories usually don't have a .git/index file.
See also the --bare command line option.

Origin

The default upstream repository.
A simple way to determine the origin of a repository on the command line is:
git remote get-url origin
TODO: git branch --track and/or git branch --set-upstream-to

Remote repository

A repository which is used to track the same project (another clone) and resides somewhere else.
To communicate with remotes, see fetch and push.
Remote repositories are registered in the .git directory under .git/refs/remotes.
See also:

Shallow repository

A shallow repository has an incomplete history some of whose commits have parents cauterized away (in other words, Git is told to pretend that these commits do not have the parents, even thoght they are recorded in the commit object). This is sometimes useful when you are interested only in the recent history of a project even though the real history recorded in the upstream is much larger. A shallow repository is created by giving the --depth option to git clone. Its history can later be deepened with git fetch.
Some times, a shallow repository is referred to as «shallow clone» (although this phrase makes it more explicit that it was created by git clone --depth.

Count contributors' number of commits

The following pipeline counts the number of commits each contributors has provided to a git repository:
$ git log --format='%aN' | sort | uniq -c  | sort -nr

Finding Git repositories

Because a git repository is typically identified by a subdirectory named .git, the can be found on a local hardisk by recursively iterating over directories, for example with this PowerShell get-childItem construct.

See also

git cherry-pick, clone, git show-ref, git daemon, git fetch, git gc, git init, pull, git send-pack
Creating a bare repository from a repository.
The Linux kernel script scripts/check-git checks if it is called within a git repository.
Git repositories hosted on GitHub, AWS CodeCommit and Azure Repos can be accessed with Oracle's package dbms_cloud_repo.

Index