git 增加空目录到版本控制中
使用git开发 需要增加两个目录 log和tmp 分别是日志文件和tmp 这两个文件夹里面的内容是不需要加入到版本控制里面去的备忘一下操作命令mkdir log
mkdir tmp
touch log/.gitignore
touch tmp/.gitignore
git add -f .
git commit -m "增加空目录"
git push
将
# Ignore everything in this directory
*
# Except this file
!.gitignore
~
写入到.gitignore
或者在项目根目录下的.gitignore将两个文件夹排除掉
完成
页:
[1]