git上传空目录
git的机制导致创建了目录,但是目录中没文件也不会上传此目录;通过了解git语法可知;我们可以在所创建的目录中添加一个.gitignore
文件,其内容如下:
# Ignore everything in this directory
*
# Except this file
!.gitignore
忽略此目录中,除改文件外的其余所有文件;
C中常用的.gitignore
内容如下:
# Prerequisites
*.d
# Object files
*.o
*.ko
*.obj
*.elf
# Linker output
*.ilk
*.map
*.exp
# Precompiled Headers
*.gch
*.pch
# Libraries
*.lib
*.a
*.la
*.lo
# Shared objects (inc. Windows DLLs)
*.dll
*.so
*.so.*
*.dylib
# Executables
*.exe
*.out
*.app
*.i*86
*.x86_64
*.hex
# Debug files
*.dSYM/
*.su
*.idb
*.pdb
# Kernel Module Compile Results
*.mod*
*.cmd
.tmp_versions/
modules.order
Module.symvers
Mkfile.old
dkms.conf
其余常用语言的.gitignore
请参考:Link
还没有评论,来说两句吧...