Undo a Git merge that hasn’t been pushed yet

With git reflog check which commit is one prior the merge (git reflog will be a better option than git log). Then you can reset it using: There’s also another way: It will get you back 1 commit. Be aware that any modified and uncommitted/unstashed files will be reset to their unmodified state. To keep them either stash changes … Read more