Returning a merge on a branch is as simple as determining which commit was the previous one.
First, check on the branch you want to change. This rule is git -golden: you can only change the branch you are in.
git checkout master
Then, find out that the previous master fixed this, and return the master to the previous state
git reset
Finally, do the right merge
git checkout devel git merge master
What you could do if you want to be lazy is the inverted state of the branches.
You still need to find master previous commit it.
Then:
git checkout devel git reset --hard master git checkout master git reset --hard <previous-commit-id>
That should do the trick.
source share