This is my graph:
Branch A a>b

v
Branch B b>c
B
A
b
B
c
b
A
git commit amend
b'
Branch A a>b'

v
Branch B b>c
b
B
b'
Actually, the grap is
ab (A)
\
c (B)
After amend, you would have a new b'
(marking b
as tmp
):
ab' (A)
\
bc (B)
(tmp)
You would need to rebase B onto A:
git rebase onto A tmp B
ab' (A)
\
c' (B)
As divyum comments, you can also merge, but that would add to A, and duplicate b
commit between, resulting in possible conflicts:
ab'M (A)
\ /
bc (B)
I prefer cherrypicking or rebasing.