What Happens When You Git Reset?
What Happens When You Git Reset? When you run git commit , Git creates a new commit and moves the branch that HEAD points to up to it. When you reset back to HEAD~ (the parent of HEAD), you are moving the branch back to where it was, without changing the index or working directory.