How to revert uncommitted changes including files and folders?

前端 未结 14 1822
小鲜肉
小鲜肉 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:35

    If you have an uncommitted change (its only in your working copy) that you wish to revert to the copy in your latest commit, do the following:

    git checkout filename
    

提交回复
热议问题