jinzhao
转自stackoverflow:
http://stackoverflow.com/questions/115983/how-do-i-add-an-empty-directory-to-a-git-repository

 

Another way to make a directory stay empty (in the repo) is to create a .gitignore inside that directory that contains two lines:

在空目录下创建.gitignore文件。

文件内写入如下代码,可以排除空目录下所有文件被跟踪:

# Ignore everything in this directory 
*
# Except this file !.gitignore

分类:

技术点:

相关文章:

  • 2022-02-06
  • 2022-12-23
  • 2021-09-27
  • 2021-09-27
  • 2022-02-10
  • 2022-12-23
  • 2021-07-04
猜你喜欢
  • 2021-09-27
  • 2021-06-17
  • 2021-09-27
  • 2021-11-01
  • 2022-12-23
  • 2021-12-27
相关资源
相似解决方案