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

Re: git rm bug

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
Jun 6, 2018, 22:51 UTC
Message-ID
<87a7s7zfz0.fsf@evledraar.gmail.com>
In-Reply-To
<20180606201012.GA2454@sleipnir>
On Wed, Jun 06 2018, Timothy Rice wrote:
Show 11 quoted lines
>> It does seem like something which could be noted in the git
>> rm docs.  Perhaps you'd care to take a stab at a patch to
>> add a note to Documentation/git-rm.txt Thomas?  Maybe a note
>> at the end of the DISCUSSION section?
>
> That same documentation could mention a common workaround for when someone
> does really want to keep the empty directories:
>
> $ touch ./path/to/empty/dir/.keep
> $ git add ./path/to/empty/dir/.keep
> $ git commit -m "Keep that empty directory because it is needed for <whatever>"

nit: The .gitkeep convention seems to be much more common in the wild than .keep, and it's probably time we documented that somewhere, even though it's not a magic .git* file like .gitattributes et al.

Previous: Robert P. J. DayNext: Ævar Arnfjörð Bjarmason
Message 9 of 11 in “git rm bug”
  1. Thomas FischerJun 6, 2018
  2. Robert P. J. DayJun 6, 2018
  3. Thomas FischerJun 6, 2018
  4. Robert P. J. DayJun 6, 2018
  5. Todd ZullingerJun 6, 2018
  6. Jeff KingJun 6, 2018
  7. Timothy RiceJun 6, 2018
  8. Robert P. J. DayJun 6, 2018
  9. Ævar Arnfjörð BjarmasonJun 6, 2018
  10. Ævar Arnfjörð BjarmasonJun 6, 2018
  11. Duy NguyenJun 6, 2018

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.