git reset
Reset current HEAD to the specified state
Git reset can copy entries from tree-ish to the index, set the current branch head (HEAD) to commit, optionally modifying index and working tree to match. The tree-ish/commit defaults to HEAD in all forms.