【问题标题】:VS code source control filled with junk filesVS 代码源控制充满垃圾文件
【发布时间】:2021-03-05 15:23:01
【问题描述】:

标题。我正在开发一个颤振项目,每次我修改一个文件时,我的源代码控制都会充满数百个随机的 android/ios/build 文件。我该如何摆脱这个?我有一个 github 存储库,我克隆了它,这开始发生了。我只希望我直接修改的文件显示在源代码管理中。

(请注意 .gitignore 是我试图解决我已清除该文件的问题)

【问题讨论】:

  • 所有这些文件都在build 目录中,顾名思义,这不应该放在存储库中,所以将此目录添加到.gitignore 文件中

标签: git flutter visual-studio-code version-control


【解决方案1】:

让我们尝试使用 Flutter 项目的默认 .gitignore 文件

# Miscellaneous
*.class
*.log
*.pyc
*.swp
.DS_Store
.atom/
.buildlog/
.history
.svn/

# IntelliJ related
*.iml
*.ipr
*.iws
.idea/

# The .vscode folder contains launch configuration and tasks you configure in
# VS Code which you may wish to be included in version control, so this line
# is commented out by default.
#.vscode/

# Flutter/Dart/Pub related
**/doc/api/
**/ios/Flutter/.last_build_id
.dart_tool/
.flutter-plugins
.flutter-plugins-dependencies
.packages
.pub-cache/
.pub/
/build/

# Web related
lib/generated_plugin_registrant.dart

# Symbolication related
app.*.symbols

# Obfuscation related
app.*.map.json
    enter code here

【讨论】:

  • 谢谢。不知道为什么这么难投票,我不记得删除了我的 gitignore,这可能对其他人有帮助
猜你喜欢
  • 2019-08-08
  • 1970-01-01
  • 2015-01-15
  • 2013-03-10
  • 2012-01-20
  • 1970-01-01
  • 2020-08-22
  • 2014-06-04
  • 1970-01-01
相关资源
最近更新 更多