git resert the HEAD and --hard

Reproduced please indicate the source https://www.cnblogs.com/sogeisetsu/p/11407764.html

git resert the HEAD and --hard

  • git reset HEAD <file>...It refers to restore one file, if you do not write <file>, then, is to restore the files to the new library and the same state
  • git reset --hardIt refers to the recovery of a library. git reset --hard HEAD^Forward fallback version, which HEADfollowed several ^that back a few versions back, if the rollback 100 version, can be written HEAD~100.

Guess you like

Origin www.cnblogs.com/sogeisetsu/p/11407764.html