The Christoffel symbol is defined as $$\Gamma_{ij}^k=\frac{1}{2}g^{kl}(\frac{\partial g_{il}}{\partial x^j}+\frac{\partial g_{lj}}{\partial x^i}-\frac{\partial g_{ij}}{\partial x^l})\tag1$$
Now in the expression about the divergence operator in local coodinates, the Christoffel symbol is expressed as $$\Gamma_{ki}^i=\frac{1}{2}g^{ij}\frac{\partial g_{ij}}{\partial x^k}=\frac{1}{2G}\frac{\partial G}{\partial x^k}=\frac{1}{\sqrt G}\frac{\partial \sqrt G}{\partial x^k}\tag2$$ where $G=det(g_{ij})$.
For the above formula, I understand the first equality since it is the direct apllication of $(1)$, but I can't understand the second and the third with the introduction of $G=det(g_{ij})$.
Can someone explain to me? Appreciate your feedback, thanks!