How to remove a file from the index in git?

后端 未结 6 738
[愿得一人]
[愿得一人] 2020-12-07 07:34

How to remove a file from the index ( = staging area = cache) without removing it from the file system?

6条回答
  •  误落风尘
    2020-12-07 07:54

    git reset HEAD  
    

    for removing a particular file from the index.

    and

    git reset HEAD

    for removing all indexed files.

提交回复
热议问题