如何在Git提交空文件夹

1,git clone url

拉取代码至本地

2,mkdir 文件夹名称

在本地创建文件夹

3,cd 文件夹名称

git init

初始化文件夹

vi .gitkeep

创建.gitkeep文件,内容如下

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

4,回到上级目录,git add .

5,git commit -m '提交信息'

6,git push origin master

posted @ 2019-05-14 12:54  Sophia_zjy  阅读(13522)  评论(1编辑  收藏  举报