如何從臨時區域中刪除單個文件(撤消git add)? - How do I remove a single file from the staging area (undo git add)?

問題:

Situation: I have a Git repository with files already in the index. 狀況:我有一個Git存儲庫,其中的文件已經在索引中。 I make changes to several files, open Git and add these files to my staging area with "git add ." 我對幾個文件進行了更改,打開Git並使用「 git add」將這些文件添加到個人暫存區中。 git

Question: How do I remove one of those files from the staging area but not remove it from the index or undo the changes to the file itself? 問題:如何從登臺區域中刪除這些文件之一,而不從索引中刪除它或撤消對文件自己的更改? spa


解決方案:

參考一: https://stackoom.com/question/6JlU/如何從臨時區域中刪除單個文件-撤消git-add
參考二: https://oldbug.net/q/6JlU/How-do-I-remove-a-single-file-from-the-staging-area-undo-git-add
相關文章
相關標籤/搜索