我应该忽略在Git中提交的`launchSettings.json`文件吗? [英] Should I ignore `launchSettings.json` file from being committed in Git?

查看:119
本文介绍了我应该忽略在Git中提交的`launchSettings.json`文件吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我发现这个相对知名的GitHub存储库,他们认为launchSettings.json文件(由Visual Studio 2017用于.Net Core项目)将被忽略.

I find this relatively known GitHub repository, where they considered launchSettings.json file (which is used by Visual Studio 2017 for .Net Core projects) is to be ignored.

https://github.com/github/gitignore/blob/master/VisualStudio.gitignore

为什么应该忽略它?我一直在工作的公司中使用它来进行提交,我很想知道是否有任何理由忽略它.

Why should it be ignored? I used always in the company I work in to commit it, I am curious to know if there is any reason to ignore it.

推荐答案

launchSettings.json应该被忽略.此后,该存储库已更新为不会忽略它: https://github.com/github/gitignore/拉/2705

launchSettings.json should not be ignored. That repository has since been updated to not ignore it: https://github.com/github/gitignore/pull/2705

进行此更改的原因:

忽略launchSettings.json没有多大意义.现在,.NET CLI甚至在使用dotnet run运行时都考虑了该文件,因为您可以阅读

Ignoring launchSettings.json does not make much sense. Now .NET CLI even considers this file when running with dotnet run, as you can read here.

如果项目成员之间共享此设置,将很有用,因此应将其提交到存储库中.

This settings will be useful if shared among project members, so it should be commited to the repo.

指向支持这些规则更改的文档的链接:

https://docs.microsoft. com/en-us/dotnet/core/tools/dotnet-run?tabs = netcore2x

这篇关于我应该忽略在Git中提交的`launchSettings.json`文件吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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