Skip to content

Add git alias to undo amend #14

@dideler

Description

@dideler

http://stackoverflow.com/questions/1459150/how-to-undo-git-commit-amend-done-instead-of-git-commit

Immediately after an amend, git reflog should show something like

f41210d HEAD@{0}: commit (amend): Summary line Z
9a0c170 HEAD@{1}: commit: Summary line Z
07dd8f6 HEAD@{2}: commit: Summary line X
...

If the first line contains "commit (amend)", grab the associated checksum hash and use it to undo the commit with git reset --soft.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions