运行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.
答案 0 :(得分:6)
尝试git add -A
,然后检查要提交的状态
答案 1 :(得分:2)
看来bin/ls
是submodule。
当您cd
进入此目录并运行git status
时,您应该看到哪些内容被修改和未跟踪,您将能够将其提交到sumbodule的基本存储库中。
之后,当在子模块的存储库的HEAD中有新的提交时,您可以在主存储库中git add
进行此更改并提交到那里。