How to undo “git commit --amend” done instead of “git commit”

970    Asked by AnneBell in SQL Server , Asked on Jun 20, 2021

 I accidentally amended my previous commit. The commit should have been separate to keep a history of the changes I made to a particular file.

Is there a way to undo git commit amend? If I do something like git reset --hard HEAD^, the first commit also is undone.

Answered by Abigail Abraham

Your Answer

Answers (5)

Is there a way to undo git commit amend? If I do something like git reset --hard HEAD^, the first commit also is undone slide down.



2 Months

level devil – not a troll game is a funny platform game where the goal is simple: reach the door at the end of the level. But the game loves surprising you with disappearing floors, sudden spikes, and unexpected traps. Just when you think you’re safe, the level decides to prank you.

3 Months

There is a deep sense of satisfaction in watching numbers go up. The game provides a steady stream of "achievements" and new cookie clicker unlocks.

4 Months

To undo a git commit (amend without losing the original commit drive mad, you can use git reflog to find the commit reference before the amend. Once you identify the correct commit hash, you can reset your branch 

7 Months

The aim of this is to provide access to third-party applications. The other is obvious: you don't want to deal with issues if someone tries to use a third-party app geometry dash lite to initiate a malicious attack on your account. Therefore, it is not possible to enable this feature when checking in with a different user account.   

1 Year

Interviews

Parent Categories