bare repository
A repository that is only the Git database, with no working tree, used as a shared place to push to and fetch from.
In more detail
Created with git init --bare, it holds what would normally be inside .git and nobody edits files in it, so a push can never overwrite someone's uncommitted work. By convention its directory name ends in .git, as in server.git. Git hosting services store repositories this way.
Example
git init --bare ../server.gitRelated terms
- repository — A project folder whose full history is tracked by version control; in Git, your files plus the hidden .git directory that stores every commit.
- remote — A short name saved in a repository's config that stands for another repository's location, a URL or a path, so you can fetch from and push to it.
- git init — The command that turns the current directory into a Git repository by creating the hidden .git directory.
Taught in
- Ignoring Files, And The Tracked File Trap — Advanced Git Internals & Distributed Workflows
- What A Remote Actually Is — Advanced Git Internals & Distributed Workflows
- Clone, Forks, Push, And The Upstream Branch — Advanced Git Internals & Distributed Workflows