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

后端 未结 30 2492
离开以前
离开以前 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:20

    When you add a .gitignore file, if you are going to put any amount of content in it (that you want Git to ignore) you might want to add a single line with just an asterisk * to make sure you don't add the ignored content accidentally.

提交回复
热议问题