git reset 命令

git reset 命令

概念:

  1.  HEAD   
  2.  工作区(Work Region
  3.  暂存区(Stage/Index Region

参数:

--soft: 推荐方式,HEAD  != Index Region == Work Region,变化集反应在Index Region中;

--mixed:  默认方式,HEAD  == Index Region != Work Region,变化集反应在Work Region中;

--hard:  危险操作,HEAD  == Index Region == Work Region,版本库覆盖,原有变化集丢失(reflog);




猜你喜欢

转载自blog.csdn.net/dovsnier/article/details/79977767