當我運行git status
時,我有一個修改列表,但我無法對它們進行分段或提交。我怎樣才能解決這個問題?爲什麼git會記住變化,但不讓我把它們放在舞臺上?
發生這種情況後,在一個巨大的提交中從某個裸倉庫中提取kernelmode目錄。
% git status
# On branch master
# Changed but not updated:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
# modified: kernelmode/linux-2.6.33/Documentation/IO-mapping.txt
# ...
$ git add kernelmode/linux-2.6.33/Documentation/IO-mapping.txt
$ git status
# On branch master
# Changed but not updated:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
# modified: kernelmode/linux-2.6.33/Documentation/IO-mapping.txt
# ...
這是一個奇怪的情況,你能想到最近在這個事情發生之前你做的任何事嗎?如果你犯了什麼會怎麼樣? 'git diff'和'git diff --cached'的輸出是什麼? – hasen 2010-03-24 23:01:34