一、在git本地仓库新建.gitignore文件
二、在.gitignore文件新增以下内容
#Prerequisites
*.d
#Object files
*.o
*.ko
*.obj
*.elf
*.crf
*.iex
*.htm
*.lnp
*.map
*.sct
*.dep
*.lst
#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
.i86
*.x86_64
*.hex
*.axf
#Debug files
*.dSYM/
*.su
*.idb
*.pdb
#Kernel Module Compile Results
.mod
.cmd
.tmp_versions/
modules.order
Module.symvers
Mkfile.old
dkms.conf
/.depend
.DS_Store
.vscode
*.bak
*.layout
三、保存文件
说明:推送时git会忽略以上的文件推送内容