如何从临时区域中删除单个文件(撤消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
相关文章
相关标签/搜索