一、背景
小伙伴们在使用git管理自己的C#代码时,.gitignore文件如何写呢?笔者找了一个模板,分享给大家。
二、模板
首先在git目录下,新建一个 .gitignore.txt 文件,然后把以下代码拷贝进去即可。
# Build and Object Folders
bin/
obj/
# Nuget packages directory
packages/
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
# User-specific files
*.suo
*.user
*.sln.docstates
# Build results
[Dd]ebug/
[Rr]elease/
x64/
*_i.c
*_p.c
*.ilk
*.meta
*.obj
*.pch
*.pdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.log
*.vspscc
*.vssscc
.builds
# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opensdf
*.sdf
# Visual Studio profiler
*.psess
*.vsp
*.vspx
# Guidance Automation Toolkit
*.gpState
# ReSharper is a .NET coding add-in
_ReSharper*
# NCrunch
*.ncrunch*
.*crunch*.local.xml
# Installshield output folder
[Ee]xpress
# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help
UpgradeLog*.XML
# Lightswitch
_Pvt_Extensions
GeneratedArtifacts
*.xap
ModelManifest.xml
#Backup file
*.bak
#zzzili
v15/
三、注意事项
1.在提交代码之前,先要把.gitignore.txt内容写好;
2.我是黑夜の骑士,欢迎大家关注我的博客,笔者将持续输出BIM相关软件开发以及编程干货;
3.欢迎加入BIM行业开发交流1群,获取更多开发资料 群号:711844216