【发布时间】:2021-10-06 16:57:17
【问题描述】:
每次我初始化一个 Angular 项目时,我的 app.component.html 都是灰色的,并且在提交到 gitHub 时它总是被排除在外。
我认为这是因为 .gitignore 文件,就像 node_modules 文件一样,但我不确定是否是这种情况,因为没有提及在 .gitignore 文件中排除该文件。
我找不到这个问题的解决方案,手动将该文件上传到 gitHub 存储库真的很痛苦。为什么总是排除这个文件以及如何不排除它?
这是 Angular 项目中的 .gitignore 文件:
# See http://help.github.com/ignore-files/ for more about ignoring files.
# compiled output
/dist
/tmp
/out-tsc
# Only exists if Bazel was run
/bazel-out
# dependencies
/node_modules
# profiling files
chrome-profiler-events*.json
speed-measure-plugin*.json
# IDEs and editors
/.idea
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace
# IDE - VSCode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
.history/*
# misc
/.sass-cache
/connect.lock
/coverage
/libpeerconnection.log
npm-debug.log
yarn-error.log
testem.log
/typings
# System Files
.DS_Store
Thumbs.db
app.component.html 显示为灰色的图像。
【问题讨论】:
标签: angular git github visual-studio-code