我在 Vista 上使用 Git Gui 时遇到问题。如果我修改 .php 文件,我可以单击“重新扫描”,文件将显示为已更改,然后我可以提交有问题的文件。但是,当我修改任何 HTML 或 CSS 文件时,我没有看到此选项。
有什么想法吗?
最佳答案
这些 html
和 css
文件是否被跟踪? (即它们之前是否已添加并提交?)
因为如果不是,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.
关于Git 未显示已更改的更新后的 css 和 html 文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4603130/