Extensions of group homomorphisms for special groups Let $G_1, G_2$ be groups, $H\leq G_1$ a subgroup, $\phi\colon H\to G_2$ a group homomorphism.
Are there some nice properties for the groups, so that it is true that we can  get a group homomorphism $\tilde{\phi}\colon G_1\to G_2$ with $\tilde{\phi}_{|H}=\phi$? 
I know that this usually isn't correct and this is also discussed in the post Extension of a group homomorphism, but maybe there are some ''nice'' properties for the groups, like $G_1, G_2$ abelian etc., where it works.
 A: This is a very special situation where it is possible. Let $G = AB$ with $A \cap B = 1$ and suppose $A$ centralizes $B / B'$, i.e. we have $b^a \in bB'$ for all $b \in B$ and $a \in A$ (or that each $b \in B$ commutes with every $a \in A$ modulo $B'$). Then if $\varphi : B \to H$ is a homomorphism into an abelian group $H$, then we can extend it to a homomorphism $\overline \varphi : G \to H$ by setting
$$
 \overline \varphi(ab) = \overline \varphi(b) = \varphi(b)
$$
i.e. simply "ignore" the $A$-part. Then for $ab, a'b' \in G$ we have
$a'b = ba'x$ with $x \in B'$ (and hence $\varphi(x) = 1$ as $H$ is abelian)
and further
\begin{align*}
 \overline \varphi(aba'b') & = \overline \varphi(aa'bxb') \\
                 & = \varphi(bxb') \\
                 & = \varphi(b)\varphi(x)\varphi(b') \\
                 & = \varphi(b)\varphi(b') \\
                 & = \overline \varphi(ab) \overline \varphi(a'b').
\end{align*}
A: Actually I've now found a result for a special situation in another post namely Extending a homomorphism $f:\left<a \right>\to\Bbb T$ to $g:G\to \Bbb T$, where $G$ is abelian and $\mathbb{T}$ is the circle group.. There is an extension if $G_1$, $G_2$ are abelian and $G_2$ is divisable.
