2011-12-13 70 views
14

我有我的項目+ RestKit子模塊。當我更改RestKit設置時出現錯誤。我添加了支持armv6和armv7架構。Git錯誤:更改沒有進行提交

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:我的項目strusture是:

enter image description here

我添加子模塊作爲

git submodule update -i 
+0

你運行過'git add RestKit'嗎? –

+0

如果你不做'git add -u'(所以只需要'git add .'和'git commit -m'message'') – zoran119

+0

這對我也沒有幫助。 – Voloda2

回答

21

你顯然處理子模塊,所以你應該使用的子模塊的工作流程:

# 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

+0

它沒有幫助我。 – Voloda2

+1

那你能給我們更多的信息嗎?你的子模塊和你的項目的狀態是什麼? – BenC

+1

我試過你的更新代碼,它的工作原理。謝謝。 – Voloda2