Git错误:更改没有提交提交 [英] Git error: Changes not staged for commit
本文介绍了Git错误:更改没有提交提交的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有我的项目+ RestKit子模块。当我更改RestKit设置时出现错误。我添加了支持armv6和armv7架构。
I have my project + RestKit submodule. Error appeared when I changed RestKit settings. I added support armv6 and armv7 architecture.
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)
#
如何解决这个错误。
UPDATE:我不运行git add RestKit。
UPDATE: I don't run git add RestKit.
UPDATE2:我的项目结构是:
UPDATE2: The strusture of my project is:
我将子模块添加为
I added submodule as
git submodule update -i
p>
You are apparently dealing with a submodule, so you should use the submodule workflow :
# 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错误:更改没有提交提交的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文