git reset [arg...]
Reset current HEAD to the specified state
Arguments
Options
Name | Description |
---|
--keep | Safe: files which are different between the current HEAD and the given commit. Will abort if there are uncommitted changes |
--soft | Remove the last commit from the current branch, but the file changes will stay in your working tree |
--hard | ⚠️WARNING: you will lose all uncommitted changes in addition to the changes introduced in the last commit |
--mixed | Keep the changes in your working tree but not on the index |
-N | Mark removed paths as intent-to-add |
--merge | Resets the index and updates the files in the working tree that are different between 'commit' and HEAD |
-q, --quiet | Be quiet, only report errors |
--no-quiet | Inverse of --quiet |
--pathspec-from-file <file> | Pathspec is passed in file <file> instead of commandline args |
--pathspec-file-nul | Pathspec elements are separated with NUL character |
-p, --patch | Interactively select hunks in the difference between the index and <tree-ish> |