Git 未显示已更改的更新后的 css 和 html 文件

标签 git

我在 Vista 上使用 Git Gui 时遇到问题。如果我修改 .php 文件,我可以单击“重新扫描”,文件将显示为已更改,然后我可以提交有问题的文件。但是,当我修改任何 HTML 或 CSS 文件时,我没有看到此选项。

有什么想法吗?

最佳答案

这些 htmlcss 文件是否被跟踪? (即它们之前是否已添加并提交?) 因为如果不是,git-gui shows untracked files as "changed but not updated" .

并且您无法提交未跟踪的文件。不过,您应该可以选择添加它们。

对于 EGit(Eclipse 中的 Git),请参阅 this tutorial ,以及Eclipse wiki EGit tutorial :

Each file in the working directory can either be tracked or untracked.

  • 跟踪的文件是上次快照中的文件或新暂存到索引中的文件。它们可以是未修改的、已修改的或暂存的。
  • 未跟踪的文件是指未出现在上一个快照中且尚未添加到索引中的所有其他文件。

When you first clone a repository all files in the working directory will be tracked and unmodified since they have been freshly checked out and you didn't start editing them yet.

As you edit files git will recognize they are modified since you have modified them since the last commit. You stage the modified files into the index and then commit the staged changes and the cycle repeats.

alt text

关于Git 未显示已更改的更新后的 css 和 html 文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4603130/

相关文章:

git - 使用 Git url (git ://github. com/...) 将源附加到 IntelliJ 项目

git - 开启gitlab二次验证后如何使用git命令

Git 禁用从本地存储库推送

svn - git-svn 和远程 git repo sync

git - 无法将 Spring Cloud Config Server 与远程 Git 集成

git - .xccheckout 有树冲突

git - 单体仓库 VS. github子模块

git - 无效的路径规范魔法

Git 问题 : Newly added folders are showing untracked

git - 在 Git 中,如何压缩与文件或文件夹相关的所有提交?