. repo/featureA, :
mkdir patches
git format-patch -o patches master..my_featureA_branch
git am patches/* -p3 --directory=repo/featureB
.
repo/featureA, ,
cat >mystuff.sed <<\EOD
/^(From [0-9a-f]{40}|diff --git )/!{H;$!d}
x
/^From /b
${h;s,.*--,--,;x}
\,^diff[^\n]* [ab]/repo/featureA/,!{$!d;x;b}
${p;x}
EOD
sed -s -i -r -f mystuff.sed patches
git am. , repo/featureA, git am --skip .