Skip to content

Commit 14b526d

Browse files
committed
Exclude Directory.Build.rsp from .gitignore template
Directory.Build.rsp is a [documented file][1] that allows setting default arguments to command line builds. However, our .gitignore template ignores _all_ `*.rsp` files. which causes confusion: 1. Devs write an .rsp file, and if they aren't being attentive forget to commit it 2. Adding it to git requires passing a `--force` flag to `git add`, which some devs mistake for a destructive or not-recommended action. Thus, explicitly allow the `Directory.Build.rsp` file. [1]: https://learn.microsoft.com/en-us/visualstudio/msbuild/msbuild-response-files?view=vs-2022#directorybuildrsp
1 parent 50419b4 commit 14b526d

File tree

2 files changed

+4
-0
lines changed
  • template_feed/Microsoft.DotNet.Common.ItemTemplates/content/Gitignore
  • test/dotnet-new.Tests/Approvals/AllCommonItemsCreate.-o#dotnet-gitignore-file#-n#item.verified/dotnet-gitignore-file

2 files changed

+4
-0
lines changed

template_feed/Microsoft.DotNet.Common.ItemTemplates/content/Gitignore/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,8 @@ StyleCopReport.xml
8888
*.pgc
8989
*.pgd
9090
*.rsp
91+
# but not Directory.Build.rsp, as it configures directory-level build defaults
92+
!Directory.Build.rsp
9193
*.sbr
9294
*.tlb
9395
*.tli

test/dotnet-new.Tests/Approvals/AllCommonItemsCreate.-o#dotnet-gitignore-file#-n#item.verified/dotnet-gitignore-file/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,8 @@ StyleCopReport.xml
8888
*.pgc
8989
*.pgd
9090
*.rsp
91+
# but not Directory.Build.rsp, as it configures directory-level build defaults
92+
!Directory.Build.rsp
9193
*.sbr
9294
*.tlb
9395
*.tli

0 commit comments

Comments
 (0)