git add之后没有进行更改

时间:2013-01-16 22:06:38

标签: git

运行Changes not staged for commit之后,为什么我会在git add .中收到项目?

> git add .
> git st 

# Changes not staged for commit:
#   (use "git add <file>..." to update what will be committed)
#   (use "git checkout -- <file>..." to discard changes in working directory)
#   (commit or discard the untracked or modified content in submodules)
#
#       modified:   bin/ls-- (modified content, untracked content)
#

这是Red Hat 4.1.2-50 git 1.7.10.

2 个答案:

答案 0 :(得分:6)

尝试git add -A,然后检查要提交的状态

答案 1 :(得分:2)

看来bin/lssubmodule

当您cd进入此目录并运行git status时,您应该看到哪些内容被修改和未跟踪,您将能够将其提交到sumbodule的基本存储库中。

之后,当在子模块的存储库的HEAD中有新的提交时,您可以在主存储库中git add进行此更改并提交到那里。