Git 子模块和状态队列
我向我的 vim 存储库添加了两个子模块,并且 git status 命令总是输出这样的内容:
On branch master
Changed but not updated:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
modified: bundle/snipmate
modified: bundle/yankring
I've run:
git submodule init
git submodule update
git add .
并且没有发生任何事情让它消失。有什么想法吗?
I added two submodules to my vim repository, and the git status command always outputs this:
On branch master
Changed but not updated:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
modified: bundle/snipmate
modified: bundle/yankring
I've run:
git submodule init
git submodule update
git add .
and nothing happens to make it go away. Any ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这可能是由于 git- 中添加的更改所致1.7.0 如果子模块包含已修改或未跟踪的文件,则子模块将被标记为脏。
git status
有一个选项--ignore-submodules
来忽略特定的更改。来自man git-status
:(此选项仅在 git-1.7.2)
This probably is due to a change added in git-1.7.0 by which submodules become marked as dirty if they contain modified or untracked files.
git status
has an option--ignore-submodules
to ignore specific changes. Fromman git-status
:(this option was only added in git-1.7.2)