首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何使用Rider忽略dotnet核心开发的所有敏感文件或缓存文件?

如何使用Rider忽略dotnet核心开发的所有敏感文件或缓存文件?
EN

Stack Overflow用户
提问于 2020-09-10 04:01:35
回答 1查看 290关注 0票数 1

无论我使用哪种gitignore,无论它来自gitignore.io,官方github,还是从流行的公共存储库复制的.gitignores,它都不会忽略无用的文件夹和文件,如obj,包缓存,.idea文件夹相关文件等。

我想忽略但仍显示为更改的文件:

代码语言:javascript
复制
<project-path>\obj\project.nuget.cache
<project-path>\obj\Debug\netcoreapp3.1\ProjectName.AssemblyInfo.cs
<project-path>\obj\Debug\netcoreapp3.1\ProjectName.csproj.nuget.g.props

当前的gitignore:

代码语言:javascript
复制
### DotnetCore ###
# .NET Core build folders
/bin
/obj

# Common node modules locations
/node_modules
/wwwroot/node_modules


### Rider ###
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839

# User-specific stuff
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/usage.statistics.xml
.idea/**/dictionaries
.idea/**/shelf

# Generated files
.idea/**/contentModel.xml

# Sensitive or high-churn files
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
.idea/**/dbnavigator.xml

# Gradle
.idea/**/gradle.xml
.idea/**/libraries

# Gradle and Maven with auto-import
# When using Gradle or Maven with auto-import, you should exclude module files,
# since they will be recreated, and may cause churn.  Uncomment if using
# auto-import.
# .idea/modules.xml
# .idea/*.iml
# .idea/modules
# *.iml
# *.ipr

# CMake
cmake-build-*/

# Mongo Explorer plugin
.idea/**/mongoSettings.xml

# File-based project format
*.iws

# IntelliJ
out/

# mpeltonen/sbt-idea plugin
.idea_modules/

# JIRA plugin
atlassian-ide-plugin.xml

# Cursive Clojure plugin
.idea/replstate.xml

# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties

# Editor-based Rest Client
.idea/httpRequests

# Android studio 3.1+ serialized cache file
.idea/caches/build_file_checksums.ser

.idea/
*.sln.iml
EN

回答 1

Stack Overflow用户

发布于 2020-09-10 05:07:21

有时候我也会遇到这种情况,

我这样做是为了修复

代码语言:javascript
复制
git rm -r --cached . 
git add .
git commit -m "fix gitignore file"
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/63818770

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档