Does the abelianisation functor $\mathrm{Grp} → \mathrm{AbGrp}$ preserve composition? I am to show there is a functor $F : \mathrm{Grp} → \mathrm{AbGrp}$. I have already checked that the assignments $F_0(G) := G_{\mathrm{ab}} := G/[G,G]$ and $F_1  (f \colon G → H) := \bar{f}: G_{\mathrm{ab}} → H_{\mathrm{ab}}$ are well-defined. (Using some elementary algebra theorems about factoring through quotients.)
In checking that $F$ preserves composition, however, I run into some trouble. I have seen that for $f \colon G → H$ and $g \colon H → K$ group homomorphisms, $F_1(g ∘ f) = \overline{g ∘ f}$ and $F_1(f) ∘ F_1(g) = \bar{f} ∘ \bar{g}$ are both maps $G_{\mathrm{ab}} → K_{\mathrm{ab}}$. (All this required some verification using factorisation through quotient groups to the abelianised groups.)
However, I fail to see that these maps are the same! I could of course evaluate them on the elements of $G_{\mathrm{ab}}$, but I’m learning category theory and therefore want to show this not the ‘intrinsic’ way but the ‘extrinsic’ way. Now I drew the following diagrams, to show my thinking:

such that both $\bar{f}, \bar{g}$, and $\overline{g ∘ f}$ appear.
Now what I know is that, for instance $g ∘ f = \overline{g ∘ f} ∘ \pi_G$.
What I’d like to do is just chase the diagrams to show $\overline{g ∘ f} = \bar{g} ∘ \bar{f}$ holds.
What would help is if $\pi_H$ would be the identity¹, which would be so if $H$ were already abelian. Because then, we would just conclude that
$$\overline{g ∘ f} ∘ \pi_G = \bar{g} ∘ \bar{f} ∘ \pi_G \,.
$$
Which would bring us a lot closer. (Still not sure how to finish then, though.)
¹In a sense, this should indeed be true, because $\bar{f}$, I think, should automatically map to an abelian group (one of the aforementioned elementary algebra theorems). HOWEVER, and this is where I get really confused, at no point was $H$ itself to be required anything but a general group!
I feel like I’m really close here, so could someone help me fill in the gaps / patch up the mistakes in my thinking?
Best wishes!
 A: Your diagrams are wrong: you claim that $\overline{f}$ is a morphism from $G_{\mathrm{ab}}$ to $H_{\mathrm{ab}}$, but in the diagram it is drawn from $G_{\mathrm{ab}}$ to $H$.
Similarly for $\overline{g}$.
However, if we draw the arrows correctly, then your approach works:
The universal property of the abelianization tells us that for every group $G$, every abelian group $A$ and every homomorphism $f$ from $G$ to $A$, there exists a unique morphism $\overline{f}$ from $G_{\mathrm{ab}}$ to $A$ with $\overline{f} ∘ π_G = f$.
It follows that for every homomorphism $f \colon G \to H$, there exists a unique homomorphism $f_{\mathrm{ab}} \colon G_{\mathrm{ab}} \to H_{\mathrm{ab}}$ that it makes the following diagram commute:
$$
 \require{AMScd}
 \begin{CD}
  G_{\mathrm{ab}}  @>{f_{\mathrm{ab}}}>>  H_{\mathrm{ab}} \\
  @A{π_G}AA                               @AA{π_H}A       \\
  G                @>>{f}>                H
 \end{CD}
$$
More explicitly, we apply the universal property to the composite $π_H ∘ f \colon G \to H_{\mathrm{ab}}$, so that
$$
 f_{\mathrm{ab}} = \overline{π_H ∘ f} \,.
$$
Note that this does not tell us what $f_{\mathrm{ab}}$ does on elements;
instead, we have constructed $f_{\mathrm{ab}}$ purely in terms of commutative diagrams.
We can now check the functoriality of this construction.
For every group $G$, the following diagram commutes:
$$
 \require{AMScd}
 \begin{CD}
  G_{\mathrm{ab}}  @>{\mathrm{id}_{G_\mathrm{ab}}}>>  G_{\mathrm{ab}} \\
  @A{π_G}AA                                           @AA{π_G}A       \\
  G                @>>{\mathrm{id}_G}>                G
 \end{CD}
$$
The commutativity of this diagram tells us that $\mathrm{id}_{G_\mathrm{ab}}$ satisfies the defining property of $(\mathrm{id}_G)_{\mathrm{ab}}$.
Therefore, $(\mathrm{id}_G)_{\mathrm{ab}} = \mathrm{id}_{G_{\mathrm{ab}}}$.
Suppose now that $f \colon G \to H$ and $g \colon H \to K$ are two composable homomorphisms.
We than have the following commutative diagram:
$$
 \require{AMScd}
 \begin{CD}
  G_{\mathrm{ab}}  @>{f_{\mathrm{ab}}}>>  H_{\mathrm{ab}}  @>{g_{\mathrm{ab}}}>>  K_{\mathrm{ab}} \\
  @A{π_G}AA                               @AA{π_H}A                               @AA{π_K}A       \\
  G                @>>{f}>                H                @>>{g}>                K
 \end{CD}
$$
By leaving out the middle column of this diagram we arrive at the following commutative diagram:
$$
 \require{AMScd}
 \begin{CD}
  G_{\mathrm{ab}}  @>{g_{\mathrm{ab}} ∘ f_{\mathrm{ab}}}>>  K_{\mathrm{ab}} \\
  @A{π_G}AA                                                 @AA{π_K}A       \\
  G                @>>{g ∘ f}>                              K
 \end{CD}
$$
The commutativity of this diagram tells us that the composite $g_{\mathrm{ab}} ∘ f_{\mathrm{ab}}$ satisfies the defining property of the homomorphsim $(g ∘ f)_{\mathrm{ab}}$.
Therefore, $(g ∘ f)_{\mathrm{ab}} = g_{\mathrm{ab}} ∘ f_{\mathrm{ab}}$.
A: Remark that you don't need diagrams. A one-line proof suffices: $\overline{f}$ is defined by $\overline{f} \circ \pi = \pi \circ f$. Now, $\overline{g} \circ \overline{f} \circ \pi = \overline{g} \circ \pi \circ f = \pi \circ g \circ f$ shows that $\overline{g} \circ \overline{f}$ satisfies  the definition of $\overline{g \circ f}$.
A: As I can't quite let it go yet, I will attempt to prove another way that, for an abelian group $G$, $\overline{\pi}_G = \overline{\pi_G ∘ \text{id}_G} =: (\text{id}_G)_{\text{ab}}$ equals $\text{id}_{G_{\text{ab}}}$, by showing that for every composable AbGrp-morphisms $f : G → A$ and $g : A → G$, we have the identities
$\overline{\pi}_A ∘ f = f$ and $f ∘ \overline{\pi}_G = f$.
Of course, the awkward thing here is that here, $\overline{\pi}_G$ is the unique group homomorphism s.t. [....]. So if we can 'ignore' the fact that a homomorphism of abelian groups in in particular a homomorphism of groups, we can still use the universal property of $\overline{\pi}_G$ that says that $\overline{\pi}_G ∘ \pi_G = \pi_G$. (And of course the reverse holds as well.) This of course looks meager, because we don't want composition with $\overline{\pi}_G $ to be neutral just w.r.t. $\pi_G$ itself, but with all aforementioned $f$'s.
The trick is, I think, that the would have to require that $A = G$, and we are looking at the (unique) identity of Hom$_{\text{AbGrp}}(G, G)$, which is $\text{id}_{G_{\text{ab}}}$.
Then without using the commutative diagram produced by Jendrik, can we indeed prove that $\overline{\pi}_G $ must be  $\text{id}_{G_{\text{ab}}}$?
EDIT
I think we can. On the one hand, we have seen that $(\text{id}_G)_\text{ab} = \overline{\pi_G}$ is the unique map that satisfies $\pi_G ∘ \text{id}_G = \overline{\pi_G} ∘ \pi_G$. But of course, this reduces to
$$\pi_G = \overline{\pi_G} ∘ \pi_G = (\text{id}_G)_\text{ab} ∘ \pi_G
$$
On the other hand, more trivially (and actually using neutrality under composition of identity morphisms), as $\pi_G$ maps to $G_\text{ab}$, we can write the obvious equality
$$\pi_G = \text{id}_{G_{\text{ab}}} ∘ \pi_G.
$$
By uniqueness, then, we must conclude that
$$ \overline{\pi_G} = (\text{id}_G)_\text{ab} =  \text{id}_{G_{\text{ab}}}.
$$
(Probably, I have unknowingly drawn some diagonal in Jendrik's commutative square, but it's nice to use the identity $\text{id}_G$ in the process, and it gives yet another perspective. It also gives the insight that the equality that I earlier deemed 'meager', turned out not to be meager at all. (A similar vibe occurs in the Yoneda Lemma, I'm told, but I'm not quite there yet ;).))
