Git不會讓我從任何地方重新綁定。Git:因爲未提交的更改而無法重新綁定
Cannot rebase: Your index contains uncommitted changes.
Please commit or stash them.
繼從這個答案說明:https://stackoverflow.com/a/13694625/618450
$ git update-index -q --ignore-submodules --refresh
$ git diff-files --ignore-submodules
雙方不產生任何輸出,但一個作用:
$ git diff-index --cached --ignore-submodules HEAD --
:100644 000000 cab819f1e5ed6cc7cff374eecae273e1d6ae6a01 0000000000000000000000000000000000000000 D .idea/codeStyleSettings.xml
:100644 000000 2953f353d2c65dd62e36926accb7f645a600b7e0 0000000000000000000000000000000000000000 D .idea/dictionaries/roxy.xml
:100644 000000 0e7ecef362d8a77067edf4bae5972f33185bd986 0000000000000000000000000000000000000000 D .idea/inspectionProfiles/Project_Default.xml
:100644 000000 3b312839bf2e939fea3ebdef15630a4b33e57caf 0000000000000000000000000000000000000000 D .idea/inspectionProfiles/profiles_settings.xml
:100644 000000 e31af55b33d82e28f471a2ba51b63c2a91fa53b7 0000000000000000000000000000000000000000 D .idea/php.xml
:100644 000000 9c25e8d4f1169b5d3103b14fdb60e7d7c3975b70 0000000000000000000000000000000000000000 D db/sfront.sql
,我無法刪除這些文件:
$ git rm --cached .idea/php.xml
fatal: pathspec '.idea/php.xml' did not match any files
任何可以幫助我的想法?
編輯: git的藏匿
固定我的問題。我不確定我是否理解發生了什麼。它抱怨的文件應該被忽略。
'git的stash',然後呢? – Ryan
看起來像修復它,謝謝。 – Pixy
文件不能同時被忽略*和*成爲您的存儲庫的一部分。如果'git'檢測到這些文件發生了變化,那麼它們以前被添加到存儲庫中(這意味着即使它們被列在'.gitignore'中也不會被忽略 - 你告訴'git'它們很重要,畢竟)。 – larsks