How to reset Git repo to HEAD?

This question already has an answer here:

  • Reset local repository branch to be just like remote repository HEAD 18 answers

  • To remove any untracked files, run

    git clean -df
    

    ( -d removes directories, -f means "force" - without it, nothing is removed.)

    You can also add -x to remove ignored files (see git help clean ).

    链接地址: http://www.djcxy.com/p/26242.html

    上一篇: 需要将git分支重置为原始版本

    下一篇: 如何重置Git仓库到HEAD?