Need to remove merging branches, but save subsequent commits (git)

Branch develop22 finished a three monts ago(was created from master).  After that developers worked with branch master. But 20 days ago develop22 pushed into master(but before master wasn’t pushed into develop22). After that developers do not suspect about this issue still worked more than 10 days. 

I need to remove this merge commit, but save subsequent commits.  

I know we can use revert this commit and after use cherry-pick for each subsequent commit, but this is really long way.

Anyone can help with much optimistic way?

Did you merge using a Pull Request? If so, there is a button on the PR that says  Revert merge. It’ll open a new PR that should revert the changes.

If not, and if you created a merge commit, use  git revert .