"bare repository" learning by examples

hustnzj發表於2022-09-15

A bare repository is normally an appropriately named directory with a .git suffix that does not have a locally checked-out copy of any of the files under revision control. That is, all of the Git administrative and control files that would normally be present in the hidden .git sub-directory are directly present in the repository.git directory instead, and no other files are present and checked out. Usually publishers of public repositories make bare repositories available.

This is a bare repository generated by git clone --bare:

➜  repo_clone_bare.git git:(master) ll
total 32
-rw-r--r--   1 administrator  staff    23B Sep 12 23:08 HEAD
-rw-r--r--   1 administrator  staff   281B Sep 12 23:08 config
-rw-r--r--   1 administrator  staff    73B Sep 12 23:08 description
drwxr-xr-x  15 administrator  staff   480B Sep 12 23:08 hooks
drwxr-xr-x   3 administrator  staff    96B Sep 12 23:08 info
drwxr-xr-x  22 administrator  staff   704B Sep 12 23:08 objects
-rw-r--r--   1 administrator  staff   383B Sep 12 23:08 packed-refs
drwxr-xr-x   4 administrator  staff   128B Sep 12 23:08 refs

Further Reading

本作品採用《CC 協議》,轉載必須註明作者和本文連結
日拱一卒

相關文章