if you want alter branch A by B
then
git checkout Agit merge B // A will update by B
else you want alter branch B by A
then
git checkout Bgit merge A // B will update by A
if you want alter branch A by B
then
git checkout Agit merge B // A will update by B
else you want alter branch B by A
then
git checkout Bgit merge A // B will update by A