Lets assume that we have one development branch \'A\', and two sub branches \'B1\' and \'B2\', (both taken from A). Lets say that you run a format code command (in
Yesterday I had similar issue after a lot of cherry-pick from (and to) a side branch where I after merged with my main branch. A lot of conflicts with identical change. I solved this with a merge strategy:
git checkout main-branch
merge --no-commit -s recursive -X ours side-branch
you can change "ours" to "theirs". Be careful because all conflicts are automatically solved choosing "ours" or "theirs" side. In my case I had few mis-merges due to this, and I fixed manually. See others interesting options of merge strategies here: https://www.kernel.org/pub/software/scm/git/docs/git-merge.html
You can also try to use a rebase (in my case it did not work well because the branchs were too different and I had a new conflict in each new rebase interaction). See this: http://davitenio.wordpress.com/2008/09/27/git-merge-after-git-cherry-pick-avoiding-duplicate-commits/