Dotnet .gitignore Template
Standard Dotnet gitignore template from upstream github/gitignore collection. Generated and merged deterministically with upstream GitHub repository patterns to keep your repository clean of package directories, temporary build artifacts, and local environment files.
Interactive Stack Generator
Open in Full GeneratorStandard Dotnet gitignore template from upstream github/gitignore collection
### Dotnet ##### A streamlined .gitignore for modern .NET projects## including temporary files, build results, and## files generated by popular .NET tools. If you are## developing with Visual Studio, the VS .gitignore## https://github.com/github/gitignore/blob/main/VisualStudio.gitignore## has more thorough IDE-specific entries.#### Get latest from https://github.com/github/gitignore/blob/main/Dotnet.gitignore # Build results[Dd]ebug/[Dd]ebugPublic/[Rr]elease/[Rr]eleases/x64/x86/[Ww][Ii][Nn]32/[Aa][Rr][Mm]/[Aa][Rr][Mm]64/bld/[Bb]in/[Oo]bj/[Ll]og/[Ll]ogs/ # .NET Coreproject.lock.jsonproject.fragment.lock.jsonartifacts/ # ASP.NET ScaffoldingScaffoldingReadMe.txt # NuGet Packages*.nupkg# NuGet Symbol Packages*.snupkg # dotenv environment variables file.env # Others~$**~CodeCoverage/ # MSBuild Binary and Structured Log*.binlog # MSTest test Results[Tt]est[Rr]esult*/[Bb]uild[Ll]og.* # NUnit*.VisualState.xmlTestResult.xmlnunit-*.xml Raw Dotnet .gitignore
Crawlable upstream source template## A streamlined .gitignore for modern .NET projects## including temporary files, build results, and## files generated by popular .NET tools. If you are## developing with Visual Studio, the VS .gitignore## https://github.com/github/gitignore/blob/main/VisualStudio.gitignore## has more thorough IDE-specific entries.#### Get latest from https://github.com/github/gitignore/blob/main/Dotnet.gitignore # Build results[Dd]ebug/[Dd]ebugPublic/[Rr]elease/[Rr]eleases/x64/x86/[Ww][Ii][Nn]32/[Aa][Rr][Mm]/[Aa][Rr][Mm]64/bld/[Bb]in/[Oo]bj/[Ll]og/[Ll]ogs/ # .NET Coreproject.lock.jsonproject.fragment.lock.jsonartifacts/ # ASP.NET ScaffoldingScaffoldingReadMe.txt # NuGet Packages*.nupkg# NuGet Symbol Packages*.snupkg # dotenv environment variables file.env # Others~$**~CodeCoverage/ # MSBuild Binary and Structured Log*.binlog # MSTest test Results[Tt]est[Rr]esult*/[Bb]uild[Ll]og.* # NUnit*.VisualState.xmlTestResult.xmlnunit-*.xml Key Pattern Breakdown
Build & Compilation Artifacts
Ignores compiled binaries, intermediate object files, and build output directories generated during development.
Environment & Secrets
Prevents leaking sensitive local credentials, API keys, database URLs, and environment configuration files.
Cache & Temporary Files
Ignores compiler caches, test runner coverage data, and transient temporary scratch files.
Source & Verification
Place this file in the root directory of your project as .gitignore. Changes take effect on newly added or untracked files.