How to revert uncommitted changes including files and folders?

前端 未结 14 1826
小鲜肉
小鲜肉 2020-11-28 17:07

Is there a git command to revert all uncommitted changes in a working tree and index and to also remove newly created files and folders?

14条回答
  •  情书的邮戳
    2020-11-28 17:32

    From Git help:

     Changes to be committed:
          (use "git restore --staged ..." to unstage)
    
        Changes not staged for commit:
          (use "git add ..." to update what will be committed)
          (use "git restore ..." to discard changes in working directory)
    

提交回复
热议问题