Why git can't do hard/soft resets by path?

前端 未结 7 1140
面向向阳花
面向向阳花 2020-12-07 17:33

$ git reset -- can reset by path.

However, $ git reset (--hard|--soft) will report an error like below:

7条回答
  •  被撕碎了的回忆
    2020-12-07 17:52

    git reset --soft HEAD~1 filename undo the commit but changes remain in local. filename could be -- for all commited files

提交回复
热议问题