Re: got(1) in base consideration

From: Dag-Erling_Smørgrav <des_at_FreeBSD.org>
Date: Wed, 07 May 2025 10:58:55 UTC
Olivier Certner <olce@freebsd.org> writes:
> I've never used 'got' so far, but is it impossible to just checkout
> the bare repository without creating any worktrees?

I've never used got either, but you should be aware that in git
terminology, “bare” refers to a clone that only has the object store,
without what we'd call a working copy in cvs or svn terminology.  A
normal clone has the object store in .git, plus a checked-out (and
possibly modified) copy of a tree, plus a (possibly empty) index
(everything you've `git add`ed but not yet committed).  Worktrees are
_additional_ checked-out trees which don't have a full copy of the
object store; instead of a .git directory, they have a .git file which
contains the absolute path to the directory within the main clone's .git
directory that contains the worktree's metadata.

(The core aka “plumbing” of git is nothing more than an object store
where each object is referenced by its sha1 hash.  VCS functionality is
implemented entirely in the UI aka “porcelain”.  In that context, most
objects represent one particular version of one particular file; some
objects are trees which map paths to file objects; yet other objects are
commits which associate a tree with metadata such as author, committer,
log message etc. and zero, one, or two references to previous revisions
from which this one is derived.  A branch is just a reference to the
object representing its most recent commit; it serves no other purpose
than user-friendly naming and preventing that commit, and all of its
ancestors, from being garbage-collected.  A tag is the same as a branch
except that the porcelain won't let you commit to a tag.)

DES
-- 
Dag-Erling Smørgrav - des@FreeBSD.org