git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
To: Kevin Buckley <Kevin.Buckley@pawsey.org.au>
Cc: git@vger.kernel.org
Subject: Re: Definition of "the Git repository"
Date: Fri, 25 Jun 2021 07:56:49 +0200	[thread overview]
Message-ID: <87tulmxyss.fsf@evledraar.gmail.com> (raw)
In-Reply-To: <7dd55e85-38eb-7346-ff10-7124102cd22b@pawsey.org.au>


On Fri, Jun 25 2021, Kevin Buckley wrote:

> Hi there,
>
> raising this on the back of a discussion over at the Software
> Carpentry lesson about Git,
>
>    https://github.com/swcarpentry/git-novice/issues/810
>
> I used the book to justify my claim that it is the .git directory
> that is the repository, but I do have to concede that the way that
> the text in section 2.1 of the book reads, does suggest that one
> can refer to the working directory PLUS the .git directory as a
> "repository" as well as being able to refer to the .git directory
> alone as the "repository".
>
> In the way I think of it
>
> git init
>
> initialises a Git repository, however, the only thing that changes
> as a result is that a .git directory has been created, ergo, the
> .git directory is the repository.
>
> Furthermore, the fact that one can take the .git directory, move it
> to a new directory and start using it there (very much a nice feature)
> also suggests to me that it is the .git directory that is the repository,
> as distict from a working directory, under Git control because of the
> existence of a repository within it.
>
> Interested to hear any thoughts around the semantics here,
> Kevin Buckley

I think the right answer to this is that there is no right answer, if
you read gitglossary(7) you'll find it mostly backs your argument, but
you'll also find mentions in git's own documentation that say things
like "a subdirectory of your repository" when referring to the
repository's working tree.

More importantly it seems like this is documentation for novices, I
think it's generally more important to get important notions like their
historical data being stored in that .git thingy than it is to nail down
every concept involved in that with 100% accuracy.

  reply	other threads:[~2021-06-25  6:07 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-25  1:44 Definition of "the Git repository" Kevin Buckley
2021-06-25  5:56 ` Ævar Arnfjörð Bjarmason [this message]
2021-06-25  8:56 ` Igor Djordjevic
2021-06-25  9:14 ` Igor Djordjevic
2021-06-25 19:39 ` Felipe Contreras
2021-06-25 20:48 ` Philip Oakley
2021-06-28  2:24   ` Kevin Buckley
2021-06-28  3:24     ` Felipe Contreras
2021-06-28  4:00       ` Kevin Buckley
2021-06-28  5:21         ` Felipe Contreras
2021-06-29  1:57           ` Kevin Buckley
2021-06-29  2:08             ` Felipe Contreras
2021-06-28 15:18     ` Philip Oakley
2021-06-28 15:34       ` Chris Torek
2021-06-29  6:59 ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87tulmxyss.fsf@evledraar.gmail.com \
    --to=avarab@gmail.com \
    --cc=Kevin.Buckley@pawsey.org.au \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).