Horje
git undo amend Code Example
git undo amend
git reset --soft HEAD@{1}
git reset amend
# Move the current head so that it's pointing at the old commit
# Leave the index intact for redoing the commit.
# HEAD@{1} gives you "the commit that HEAD pointed at before 
# it was moved to where it currently points at". Note that this is
# different from HEAD~1, which gives you "the commit that is the
# parent node of the commit that HEAD is currently pointing to."
git reset --soft HEAD@{1}

# commit the current tree using the commit details of the previous
# HEAD commit. (Note that HEAD@{1} is pointing somewhere different from the
# previous command. It's now pointing at the erroneously amended commit.)
git commit -C HEAD@{1}




Shell

Related
chocolatey list installed Code Example chocolatey list installed Code Example
find out which procses is using port linux Code Example find out which procses is using port linux Code Example
install auth in laravel 8 with bootstrap Code Example install auth in laravel 8 with bootstrap Code Example
how to remove git initialization Code Example how to remove git initialization Code Example
install nest cli Code Example install nest cli Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
13