Skip to content

git reset HEAD doesn't undo the last commit #63

@ugtar

Description

@ugtar

The docs for git reset say:
'git reset HEAD undo the last commit and unstage the files'

git reset HEAD will unstage files, but it will not undo the last commit unless you reset HEAD to HEAD~1 or HEAD^.

the sections for git reset --soft and git reset --hard also say the last commit will be undone.

I think this needs to be clarified. Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions