git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Definition of "the Git repository"

From
KBKevin Buckley <kevin.buckley@pawsey.org.au>
Date
Jun 25, 2021, 01:44 UTC
Message-ID
<7dd55e85-38eb-7346-ff10-7124102cd22b@pawsey.org.au>
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

-- 
Supercomputing Systems Administrator
Pawsey Supercomputing Centre
Next: Ævar Arnfjörð Bjarmason
Message 1 of 15 in “Definition of "the Git repository"”
  1. Kevin BuckleyJun 25, 2021
  2. Ævar Arnfjörð BjarmasonJun 25, 2021
  3. Igor DjordjevicJun 25, 2021
  4. Igor DjordjevicJun 25, 2021
  5. Felipe ContrerasJun 25, 2021
  6. Philip OakleyJun 25, 2021
  7. Kevin BuckleyJun 28, 2021
  8. Felipe ContrerasJun 28, 2021
  9. Kevin BuckleyJun 28, 2021
  10. Felipe ContrerasJun 28, 2021
  11. Kevin BuckleyJun 29, 2021
  12. Felipe ContrerasJun 29, 2021
  13. Philip OakleyJun 28, 2021
  14. Chris TorekJun 28, 2021
  15. Junio C HamanoJun 29, 2021

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.