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)
#
How to fix this error.
UPDATE: I don't run git add RestKit.
UPDATE2: The strusture of my project is:
I added submodule as
git submodule update -i
The “changes not staged for commit” message shows when you run the “git status” command and have a file that has been changed but has not yet been added to the staging area. This is not an error message, rather a notification that you have changed files that are not in the staging area or a commit.
Changes to files are not staged if you do not explicitly git add them (and this makes sense). So when you git commit , those changes won't be added since they are not staged. If you want to commit them, you have to stage them first (ie. git add ).
Your answer This occurs because you might have git directories in other folders as well.
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"
You can find more information here.
Also : Git Book on Submodules
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With