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

Re: empty directories

From
Alex Riesen <raa.lkml@gmail.com>
Date
Apr 23, 2007, 16:19 UTC
Message-ID
<81b0412b0704230919h3be7a67fqec431a6afb6e3760@mail.gmail.com>
In-Reply-To
<f36b08ee0704230840xa37e149qffa15c5c685524c4@mail.gmail.com>
On 4/23/07, Yakov Lerner <iler.ml@gmail.com> wrote:
> When I git-add empty directory (mkdir d1;git-add d1),
> git refuses to add it [1].
>
> I was told on #git chan that git cannot store empty dirs.
It can, just refuses to. Which considered good by most
> But when I do
>          git-add -f emptyDir # where emptyDir is empty dir
> , emptyDir is added and then cloned. What does it mean ?

$ git add -f emptyDir fatal: unable to index file emptyDir

> Does it mean that if i git-add emptyDir with -f, it may break
> something in the repo ? That I shall not try it ? Or it is ok ?

It is not ok and it does not break anything. What git do you have, as I apparently cannot reproduce it.

Previous: Yakov LernerNext: Yakov Lerner
Message 2 of 3 in “empty directories”
  1. Yakov LernerApr 23, 2007
  2. Alex RiesenApr 23, 2007
  3. Yakov LernerApr 23, 2007

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.