'Git merge feature branch to both master and develop without base changes

In my git environment I've master and develop branch.
Both are having different configuration files. When a change is required, create a branch from master(feature/change-abc) then do the changes and merge in to develop branch. The problem is when merging the branch it always merge with other differences in master branch. But I need to merge only the change I did in feature/change-a to develop branch.

This question is already asked but there is no proper answer for this. chery pick command is discouraged by most of the developers.

Git - Using multiple concurrent master/develop pairs and merging feature branches to both



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source