recentpopularlog in

kme : abortabort   3

Undo a Git merge that hasn't been pushed yet? - Stack Overflow
With git log check which commit is one prior the merge. Then you can reset it using:

git reset --hard commit_sha

There's also another way

git reset --hard HEAD~5

will get you back 5 commits.

As @Velmont suggested below in his answer, in this direct case using:

git reset --hard ORIG_HEAD
git  reset  abortabort  scm  versioncontrol  solution 
june 2016 by kme
git - How do you undo the last commit? - Stack Overflow
Undo a commit and redo

$ git commit ... (1)
$ git reset --soft HEAD~1 (2)
<< edit files as necessary >> (3)
$ git add .... (4)
$ git commit -c ORIG_HEAD (5)

This is what you want to undo

This is most often done when you remembered what you just committed is incomplete, or you misspelled your commit message1, or both. Leaves working tree as it was before "commit".

Make corrections to working tree files.

Stage changes for commit.

Commit the changes, reusing the old commit message. reset copied the old head to .git/ORIG_HEAD; commit with -c ORIG_HEAD will open an editor, which initially contains the log message from the old commit and allows you to edit it. If you do not need to edit the message, you could use the -C option instead.
git  undo  abortabort  undobutton  scm  devel  solution  dammitbrain 
august 2015 by kme
version control - Aborting a merge in Git - Stack Overflow []
Since your pull was unsuccessful then just HEAD is the last "valid" commit on your branch (not HEAD^):

git reset --hard HEAD
git  whenthingsgowrong  merge  abortabort  solution 
july 2014 by kme

Copy this bookmark:

to read