Merging a branch with a reverted change

Here is the situation. I accidentally committed to master branch which I actually wanted to commit to branch X. Then I merge master to X then git revert the changes on master. But eventually this X will be merged to master but then It won’t merge this reverted change. What is the most proper way… Read More Merging a branch with a reverted change