用gitee提交本地文件到仓库时,很多人在推送过程中发现会有很多多余文件,需要手动筛选自己需要推送的文件,耗费时间。本片blog分享如何在推送过程中过滤掉自己不需要的文件。
步骤一:创建命名为.gitignore的文件,创建过程中选择查看——显示——文件扩展名,选中文件扩展名,以防在命名时会有其他字符干扰。
步骤二:在新建的文件中加入以下文本文件:
# Build and Release Folders
bin-debug/
bin-release/
[Oo]bj/
[Bb]in/
# Other files and folders
.settings/
# Executables
*.swf
*.air
*.ipa
*.apk
#过滤掉不想要文件和文件夹
*.exe
*.sln
*.vcxproj
*.filters
*.user
*.suo
*.db
*.ipch
Debug/
.vs
Release/
# Project files, i.e. `.project`, `.actionScriptProperties` and `.flexProperties`
# should NOT be excluded as they contain compiler settings and other important
# information for Eclipse / Flash Builder.
步骤三:将以上文件放入到需要进行gitee推送的文件夹,实现过滤。