How to revert a very old git merge commit?

Suppose I have a feature branch and a master branch, I commit few changes in my feature branch and merged it with master branch and few other branches get merged to master after that. Now I want to revert my changes and remove my code from the master branch. How can I do so?

Case 2: my feature branch is merged to master more than once and few other branches are also merged in between. and I want to remove all my commits from the master branch.

I am using Bitbucket server as my Git repository. Any plugin to do the job would be perfect.

Thanks in advance.

Hi @appleajay,

It’s not automated in any way, but you can use Git’s cherry-picking feature to selectively remove commits from a branch. Being a part of GitHub, I am unfamiliar if Bitbucket has any plugins to make this easier.