Q:

undo a git merge

git reset --hard HEAD~1
git reset --hard <commit_sha>
7
git merge --abort
4
git reset --hard HEAD~1
1
// find the commit hash
git log --oneline

git revert -m 1 [commit-hash]

// https://www.datree.io/resources/git-undo-merge
0

New to Communities?

Join the community