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

Re: Question - .git subdirectories

From
Jonathan Nieder <jrnieder@gmail.com>
Date
Oct 31, 2019, 23:01 UTC
Message-ID
<20191031230106.GB211076@google.com>
In-Reply-To
<CABf25VhaqrbtRTpL5ZNRy59o4JSsiKpF3pk3+54sDCkvzdgAmw@mail.gmail.com>
Hi Arkadij,
Arkadij Chistyj wrote:
>                                               I just want that git
> treats my .git/ subdirs as plain dirs with any other names.
[...]
> It's very simple functionality but I can't find any simple and right solution.
> I just want to know is this possible or not? If not possible, then why?
To add to what brian wrote:
This is one of many things that Git doesn't track:
- empty directories
- full permissions for files it's tracking
- owner, group, other attributes
- resource fork on filesystems that support multiple forks

Git was initially designed to handle source code. Later, people have started to use it for tracking other kinds of documents, which has been nice. In general, when push comes to shove, the project has prioritized making it work well for tracking source code and other documents.

Sometimes people find other uses for Git (deployment tool! home directory tracker! configuration management system!). It can be fun[1]. :) Ultimately, though, it's useful to keep the main goals of Git in mind.

Sometimes people want to track a Git repository in another repository as a source of test data for tests they include with their code. For this use, using a "git fast-export" stream or other method for generating a repository at test time can work better, or, if one really must use a repo-in-repo, using a bare repository. Brian did a good job of describing why.

Thanks and hope that helps, Jonathan

[1] https://public-inbox.org/git/?q=ugfwiini
Previous: brian m. carlsonNext: Arkadij Chistyj
Message 3 of 4 in “Question - .git subdirectories”
  1. Arkadij ChistyjOct 29, 2019
  2. brian m. carlsonOct 31, 2019
  3. Jonathan NiederOct 31, 2019
  4. Arkadij ChistyjNov 2, 2019

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.