angular - Git 在运行 ng build --prod 后没有说什么要提交
问题描述
我在 VSCode 终端中保存了对文件的更改。运行以下命令:
git status(This showed the changes.)
git add .
git status (This showed the files added)
git commit -m "My commit message."
git push (This showed the files were pushed up to git).
然后我运行ng build --prod
. 构建运行没有问题。我跑git status
了,我得到以下信息:
$git status On branch qa 你的分支是最新的'origin/qa'。
没什么可提交的,工作树干净
我在正确的分支上。我已经重建了很多次,没有问题。任何人都知道如何解决它。
解决方案
Angular 构建通常保存在根路径中的 dist 文件夹中。
在 .gitignore 文件中,声明了在源代码管理中省略的路径。dist 文件夹就是其中之一。这就是您在git status
.
这是 .gitignore 文件内容的示例。
# See http://help.github.com/ignore-files/ for more about ignoring files.
# compiled output
/dist -----> /dist is mentioned in this file
/tmp
/out-tsc
# dependencies
/node_modules
# IDEs and editors
/.idea
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace
推荐阅读
- python - .strip('{}:'.format(key)) 有时会去除最后一个字符
- android - Android 应用无法通过 WIFI 连接到本地服务器
- c - HAL_UART_Transmit 发送错误数据
- image - Win/ffmpeg - 如何从 ffmpeg 下的图像生成视频?
- c# - 如何使用 c# 添加和更新 PDF 文件的注释
- python - tf.nn.in_top_k 的输入维度
- google-cloud-sql - 无法通过 Dataproc 上的 SQL 代理连接到 Cloud SQL
- c++ - 使用参数的 constexpr 运算符重载问题
- firebase - Firebase - 动态链接限制
- python - 将插入光标保持在只读 Tkinter 条目上