OK. Let us take ordinary derivative of determinant of some covariant 2-tensor $A_{\mu\nu}$. Let call it $A$. But it is more convenient to allow us to think about $A_{\mu\nu}$ like a matrix with covariant indices. So $$\det{A_{\mu\nu}} = A$$
Next, let's do the following calculations:
$$\delta\ln{\det{A_{\mu\nu}}} = \ln{\det{(A_{\mu\nu}}+\delta A_{\mu\nu})}-\ln{\det{A_{\mu\nu}}} = \ln{\det({A^{\mu\sigma}(A_{\sigma\nu}+\delta A_{\sigma\nu}))}},$$
where $\delta$ is like differential and $A^{\mu\sigma}$ denotes contravriant 2-tensor with the following property: $A^{\mu\sigma}A_{\sigma\nu} = \delta^{\mu}_{\,\nu}$, in other words, "inverse" tensor.
Let's continue
$$\ln{\det({A^{\mu\sigma}(A_{\sigma\nu}+\delta A_{\sigma\nu}))}} = \ln{\det{(I+A^{\mu\sigma}\delta A_{\sigma\nu})}} = \ln{(1 + \mathrm{Tr}\,{A^{\mu\sigma}\delta A_{\sigma\nu}})} = \mathrm{Tr}\,{A^{\mu\sigma}\delta A_{\sigma\nu}}.$$
But
$$\mathrm{Tr}\,{A^{\mu\sigma}\delta A_{\sigma\nu}} = A^{\mu\sigma}\delta A_{\sigma\mu}$$
Divided by $dx^{\lambda}$ it gives
$$\partial_{\lambda}\ln{\det{A_{\mu\nu}}} = A^{\mu\sigma}\partial_{\lambda} A_{\sigma\mu}.$$
Therefore,
$$\frac{\partial_{\lambda}A}{A} = A^{\mu\sigma}\partial_{\lambda} A_{\sigma\mu}$$
Or
$$\partial_{\lambda}g = g g^{\mu\sigma}\partial_{\lambda} g_{\sigma\mu}$$
The following step is pretty fun. Let's replace all ordinary partials by absolute (covariant). So we have
$$\nabla_{\lambda}g = g g^{\mu\sigma}\nabla_{\lambda} g_{\sigma\mu}.$$
But
$$\nabla_{\lambda} g_{\sigma\mu} = 0.$$
QED. The last is not hard exercise. Indeed, in the geodesic coordinates it is always true because in these coordinates $\nabla_{\nu} = \partial_{\nu}$. But if some tensor is equal to zero in one reference frame then it is zero in every reference frame.
But I am not sure about the same trick with arbitrary matrix (although it may turn out the same). It would be better to use the following. Since
$$\det{g^{\mu\nu}A_{\nu\sigma}}$$
is a scalar, we can use ordinary derivative for this. But on the other hand, we could use covariant derivative for it. For scalar it is the same. So
$$\nabla_{\nu}(\det{g^{\mu\nu}A_{\mu\nu}}) = g^{-1}\nabla_{\nu}A + A\nabla_{\nu}g^{-1} = g^{-1}\partial_\nu A + A\partial_\nu g^{-1}$$
Let us continue calculations
$$\nabla_{\nu}A = \partial_{\nu} A - A\frac{\partial_\nu g}{g}$$
Where we used $\nabla_\nu g = 0$.
Partial derivatives we can find from the previous equations.