Important Commands 
git reflog 
The git reflog command allows you to display all the commits that the head (HEAD) has gone through, in reverse chronological order. This allows you to revert to a previous state if you made a mistake in an operation.
git reset 
The git reset <sha1-or-ref> command allows you to reset the current branch to a particular commit (or ref):
shell
git reset 123abcd3 # 123abcd3 is the SHA-1 of a commitshell
git reset develop # develop is the name of a branchgit restore 
The git restore command allows you to move one or more files and/or folders from one state to another:
The following command will move index.html from a modified state (compared to the previous commit) to an unmodified state (the same state as in the previous commit):
shell
git restore index.htmlThe following command will move index.html from a modified and staged state (compared to the previous commit) to a modified but unstaged state:
shell
git restore --staged index.html