Git错误:未提交更改的更改

时间:2011-12-13 12:01:48

标签: git git-submodules

我有我的项目+ RestKit子模块。我更改了RestKit设置时出现错误。我添加了支持armv6和armv7架构。

git add .
git add -u 
git commit -m "new"
# On branch master
# 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:   RestKit (modified content)
#

如何解决此错误。

更新:我没有运行git add RestKit。

UPDATE2:我项目的结构是:

enter image description here

我添加了子模块

git submodule update -i

1 个答案:

答案 0 :(得分:23)

您显然正在处理子模块,因此您应该使用子模块工作流程:

# Modification on RestKit, for instance :
cd RestKit
git add .
git commit -m "Support for armv6 & armv7"
cd ..
# RestKit submodule up-to-date, now update your project
git add RestKit
git commit -m "RestKit submodule updated"

您可以找到更多信息here

另外:Git Book on Submodules

相关问题