gitignore的aspnet核心项目的常见做法是什么 [英] What's the common practice of gitignore for aspnet core project

查看:174
本文介绍了gitignore的aspnet核心项目的常见做法是什么的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道它取决于项目,但我想学习的是典型的asp.net核心项目(例如忽略 node_modules )的常见做法。

解决方案

对于ASP.NET项目,这是标准的 .gitignore 结合了.NET Core和Visual Studio的东西。来自Omnisharp的官方 yo-generator-aspnet
$ b 来源: https://raw.githubusercontent.com/OmniSharp/generator-aspnet/master/templates/gitignore.txt

  ##忽略Visual Studio生成的临时文件,生成结果和
##文件Studio附加组件。

#特定于用户的文件
* .suo
* .user
* .userosscache
* .sln.docstates

#用户特定的文件(MonoDevelop / Xamarin Studio)
* .userprefs

#生成结果
[Dd] ebug /
[Dd] ebugPublic /
[Rr] elease /
[Rr] eleases /
x64 /
x86 /
build /
bld /
[Bb] in /
[Oo] bj /

#Visual Studio 2015缓存/选项目录
.vs /
#如果您有任务在wwwroot $中创建项目的静态文件,请取消注释
#wwwroot /

#MSTest测试结果
[Tt] est [Rr] esult * /
[Bb] uild [Ll] og。*

#NUNIT
* .VisualState.xml
TestResult.xml

#建立ATL项目的结果
[Dd] ebugPS /
[Rr] eleasePS /
dlldata.c

#DNX
project.lock.json
artifacts /

* _i.c
* _p.c
* _i.h
* .ilk
* .meta
* .obj
* .pch
* .pdb
* .pgc
* .pgd
* .rsp
* .sbr
* .tlb
* .tli
* .tlh
* .tmp
* .tmp_pro j
* .log
* .vspscc
* .vssscc
.builds
* .pidb
* .svclog
* .scc

#Chutzpah测试文件
_Chutzpah *

#Visual C ++缓存文件
ipch /
* .aps
* .ncb
* .opendb
* .opensdf
* .sdf
* .cachefile

#Visual Studio分析器
* .psess
* .vsp
* .vspx
* .sap

#TFS 2012本地工作区
$ tf /

#Guidance Automation Toolkit
* .gpState

#ReSharper是一个.NET编码加载项
_ReSharper * /
*。[Rr] e [Ss] harper
* .DotSettings.user

#JustCode是.NET编码加载项
.JustCode

#TeamCity是一个构建加载项
_TeamCity *

#DotCover是一个代码覆盖工具
* .dotCover

#NCrunch
_NCrunch_ *
。* crunch * .local。 xml
nCrunchTemp_ *

#MightyMoose
* .mm。*
AutoTest.Net/

#Web工作台(sass)
.sass-cache /

#Installshield输出文件夹
[Ee] xpress /

#DocProject是文档生成器加载项
DocProject / buildhelp /
DocProject / Help / *。HxT
DocProject / Help / *。HxC
DocProject / Help / *。 hhc
DocProject / Help / *。hhk
DocProject / Help / *。hhp
DocProject / Help / Html2
DocProject / Help / html

#点击一次目录
发布/

#发布Web输出
*。[Pp] ublish.xml
* .azurePubxml
#TODO:评论下一行如果你想签入你的web部署设置
#但是数据库连接字符串(有潜在的密码)将是未加密的
* .pubxml
* .publishproj

#NuGet软件包
* .nupkg
#软件包文件夹可以被忽略,因为软件包还原
** / packages / *
#除了build /,它被用作MSBuild目标。
!** / packages / build /
#如果需要,请取消注释,但通常会在需要时重新生成
#!** / packages / repositories.config

#Microsoft Azure Build输出
csx /
* .build.csdef

#Microsoft Azure模拟器
ecf /
rcf /

#Microsoft Azure ApplicationInsights配置文件
ApplicationInsights.config
$ b $ Windows Store应用程序包目录
AppPackages /
BundleArtifacts /

# Visual Studio缓存文件以.cache结尾的
#文件可以忽略
*。[Cc] ache
#但是跟踪以.cache结尾的目录
!*。[Cc ] ache /

#其他
ClientBin /
〜$ *
*〜
* .dbmdl
* .dbproj.schemaview
* .pfx
* .publishsettings
node_modules /
orleans.codegen.cs

#RIA / Silverlight项目
Generated_Code /

#备份&报告将旧项目文件
#转换为较新的Visual Studio版本的文件。备份文件不需要,
#因为我们有git ;-)
_UpgradeReport_Files /
备份* /
UpgradeLog * .XML
UpgradeLog * .htm

#SQL Server文件
* .mdf
* .ldf

#商业智能项目
* .rdl.data
*。 bim.layout
* .bim _ *。设置

#Microsoft Fakes
FakesAssemblies /

#GhostDoc插件设置文件
* .GhostDoc .xml

#用于Visual Studio的Node.js工具
.ntvs_analysis.dat

#Visual Studio 6生成日志
* .plg

#Visual Studio 6工作区选项文件
* .opt

#Visual Studio LightSwitch构建输出
** / *。HTMLClient / GeneratedArtifacts
* DesktopClient / GeneratedArtifacts
** / *。DesktopClient / ModelManifest.xml
** / *。Server / GeneratedArtifacts
** / *。Server / ModelManifest.xml
_Pvt_Extensions

#Paket依赖关系管理器
.paket / paket.exe

#FAKE - F#Make
.fake /
code>


I know it depends on the project but i want to learn is there a common practice for typical asp.net core project(such as ignoring node_modules).

This is standard .gitignore for ASP.NET projects, it combines things from .NET Core and Visual Studio. Taken from official yo-generator-aspnet from Omnisharp.

Source: https://raw.githubusercontent.com/OmniSharp/generator-aspnet/master/templates/gitignore.txt

## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.

# User-specific files
*.suo
*.user
*.userosscache
*.sln.docstates

# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs

# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
build/
bld/
[Bb]in/
[Oo]bj/

# Visual Studio 2015 cache/options directory
.vs/
# Uncomment if you have tasks that create the project's static files in wwwroot
#wwwroot/

# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*

# NUNIT
*.VisualState.xml
TestResult.xml

# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c

# DNX
project.lock.json
artifacts/

*_i.c
*_p.c
*_i.h
*.ilk
*.meta
*.obj
*.pch
*.pdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*.log
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc

# Chutzpah Test files
_Chutzpah*

# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opendb
*.opensdf
*.sdf
*.cachefile

# Visual Studio profiler
*.psess
*.vsp
*.vspx
*.sap

# TFS 2012 Local Workspace
$tf/

# Guidance Automation Toolkit
*.gpState

# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user

# JustCode is a .NET coding add-in
.JustCode

# TeamCity is a build add-in
_TeamCity*

# DotCover is a Code Coverage Tool
*.dotCover

# NCrunch
_NCrunch_*
.*crunch*.local.xml
nCrunchTemp_*

# MightyMoose
*.mm.*
AutoTest.Net/

# Web workbench (sass)
.sass-cache/

# Installshield output folder
[Ee]xpress/

# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html

# Click-Once directory
publish/

# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
# TODO: Comment the next line if you want to checkin your web deploy settings
# but database connection strings (with potential passwords) will be unencrypted
*.pubxml
*.publishproj

# NuGet Packages
*.nupkg
# The packages folder can be ignored because of Package Restore
**/packages/*
# except build/, which is used as an MSBuild target.
!**/packages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/packages/repositories.config

# Microsoft Azure Build Output
csx/
*.build.csdef

# Microsoft Azure Emulator
ecf/
rcf/

# Microsoft Azure ApplicationInsights config file
ApplicationInsights.config

# Windows Store app package directory
AppPackages/
BundleArtifacts/

# Visual Studio cache files
# files ending in .cache can be ignored
*.[Cc]ache
# but keep track of directories ending in .cache
!*.[Cc]ache/

# Others
ClientBin/
~$*
*~
*.dbmdl
*.dbproj.schemaview
*.pfx
*.publishsettings
node_modules/
orleans.codegen.cs

# RIA/Silverlight projects
Generated_Code/

# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm

# SQL Server files
*.mdf
*.ldf

# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings

# Microsoft Fakes
FakesAssemblies/

# GhostDoc plugin setting file
*.GhostDoc.xml

# Node.js Tools for Visual Studio
.ntvs_analysis.dat

# Visual Studio 6 build log
*.plg

# Visual Studio 6 workspace options file
*.opt

# Visual Studio LightSwitch build output
**/*.HTMLClient/GeneratedArtifacts
**/*.DesktopClient/GeneratedArtifacts
**/*.DesktopClient/ModelManifest.xml
**/*.Server/GeneratedArtifacts
**/*.Server/ModelManifest.xml
_Pvt_Extensions

# Paket dependency manager
.paket/paket.exe

# FAKE - F# Make
.fake/

这篇关于gitignore的aspnet核心项目的常见做法是什么的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆