How to remove files from git staging area?

后端 未结 14 1276
失恋的感觉
失恋的感觉 2020-11-28 16:53

I made changes to some of my files in my local repo, and then I did git add -A which I think added too many files to the staging area. How can I delete all the

14条回答
  •  醉酒成梦
    2020-11-28 17:30

    It is very simple:

    1. To check the current status of any file in the current dir, whether it is staged or not:

      git status

    2. Staging any files:

      git add . for all files in the current directory

      git add for specific file

    3. Unstaging the file:

      git restore --staged

提交回复
热议问题