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

Vol*_*da2 15 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)
#
Run Code Online (Sandbox Code Playgroud)

如何解决此错误.

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

UPDATE2:我项目的结构是:

在此输入图像描述

我添加了子模块作为

git submodule update -i
Run Code Online (Sandbox Code Playgroud)

Ben*_*enC 24

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

# 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"
Run Code Online (Sandbox Code Playgroud)

您可以在此处找到更多信息.

另外:关于子模块的Git Book