(created/git2cpp/reset.md)=
# git2cpp reset

```{parsed-literal}
Reset current HEAD to the specified state


git2cpp reset [OPTIONS] [&lt;commit&gt;]


POSITIONALS:
&nbsp; &lt;commit&gt; TEXT               The ID of the commit that will become HEAD

OPTIONS:
&nbsp; -h,     --help              Print this help message and exit
&nbsp;         --soft              Leave your working tree files and the index unchanged. For
&nbsp;                             example, if you have no staged changes, you can use <span class=git2cpp-bold>git reset
&nbsp;                             --soft HEAD~5</span>; <span class=git2cpp-bold>git commit</span> to combine the last 5
&nbsp;                             commits into 1 commit. This works even with changes in the
&nbsp;                             working tree, which are left untouched, but such usage can lead
&nbsp;                             to confusion.
&nbsp;         --mixed             Leave your working directory unchanged. Update the index to match
&nbsp;                             the new HEAD, so nothing will be staged.
&nbsp;         --hard              Overwrite all files and directories with the version from
&nbsp;                             <span class=git2cpp-bold>&lt;commit&gt;</span>, and may overwrite untracked files. Tracked
&nbsp;                             files not in <span class=git2cpp-bold>&lt;commit&gt;</span> are removed so that the working
&nbsp;                             tree matches <span class=git2cpp-bold>&lt;commit&gt;</span>. Update the index to match the new
&nbsp;                             HEAD, so nothing will be staged.
```
