How can I add an empty directory to a Git repository?

后端 未结 30 2493
离开以前
离开以前 2020-11-21 04:52

How can I add an empty directory (that contains no files) to a Git repository?

30条回答
  •  北荒
    北荒 (楼主)
    2020-11-21 05:05

    You can't and unfortunately will never be able to. This is a decision made by Linus Torvald himself. He knows what's good for us.

    There is a rant out there somewhere I read once.

    I found Re: Empty directories.., but maybe there is another one.

    You have to live with the workarounds...unfortunately.

提交回复
热议问题