Derivative of a metric tensor along a curve Let $M$ be a Riemannian manifold with metric tensor $g$ and Levi-Civita connection $\nabla$.
Also, let $u: \mathbb{R}\to T_pM$ be a smooth curve in $T_pM$. In a proof, my course notes assure that
$$\frac{d}{dt} \left(g_p(u(t),u(t))\right)=2g_p\left(\frac{d}{dt} u(t),u(t)\right)\text{ (1).}$$
This is giving me a few problems. First of all, $\frac{d}{dt} u(t)$ is an element of $T(T_pM)$, but we identify it with $T_pM$, is that right ?
But then, for me, by definition of the Levi-Civita connection,
$$\frac{d}{dt} \left(g_p(u(t),u(t))\right)=2g_p\left(\frac{D}{dt}u(t),u(t)\right)\text{ (2)},$$
where $\frac{D}{dt}$ is the covariant derivative, giving here
$$\frac{D}{dt} u(t)=\dot u_i(t)\frac{\partial}{\partial x_i}+u_i(t)\nabla_{\dot u(t)}\frac{\partial}{\partial x_i}$$
with $\frac{\partial}{\partial x_i}$ a basis of $T_pM$.
Are the two expressions equal (which doesn't seem because of the second terme of the last equation) or does one of them contain a mistake ?
 A: You got a small mistake in your last formula.
However, you can see the result in two different way.
The first one, simplest one, is the following. 
If you fix $p\in M$ then the map $(X,Y)\mapsto g_p(X,Y)$ is a bilinear map from $T_pM\times T_pM$ to $\mathbb R$. But $g_p$ gives you a norm on the vector space $T_pM$.
The curve $u:\mathbb R \rightarrow T_pM$ can then be seen as a smooth map on the vector space $T_pM \cong \mathbb R^n$. So everything is about derivative in a fixed vector space and you know the formula of the derivative of a bilinear map, a composition of two smooth maps, etc...
Finally, you get that the derivative of the map $h:t\mapsto g_p(u(t),u(t))$ is exactly  $$h'(t)=g_p(u'(t),u(t))+g_p(u(t),u'(t))=2g_p(u'(t),u(t)).$$
The second one, using the covariant derivative along a curve.
Let me remind you that a vector field along a curve $\gamma:\mathbb R \rightarrow M$ is a smooth map $X:\mathbb R \rightarrow TM$ such that $\pi\circ X=\gamma$ where $\pi:TM\rightarrow M$ is the canonical projection.
If we fix coordinates $(x_1,\cdots,x_n)$ on $M$, and write $X=\sum_{i=1}^nX_i\dfrac{\partial}{\partial x_i}$ then $$\dfrac{DX}{dt}=\sum_{i=1}^n\dfrac{dX_i}{dt}\dfrac{\partial}{\partial x_i}+\sum_{i=1}^nX_i\nabla_{\gamma'}\dfrac{\partial}{\partial x_i}$$
Now, one can see your map $u$ as a smooth map : $X:\mathbb R\rightarrow TM, t\mapsto (p,u(t))$ i.e. $\forall t\in \mathbb R, X(t)\in T_pM$ and its value is $u(t)$.
Since $\forall t\in\mathbb R, \pi\circ X(t)=p$ is a constant map, you can say that $X$ is a vector field along the constant curve $\gamma:\mathbb R \rightarrow M, t\mapsto p$.
Hence $\gamma'(t)=0$ and the computation of $\dfrac{DX}{dt}$ gives only one term: $$\dfrac{DX}{dt}=\sum_{i=1}^n\dfrac{dX_i}{dt}\dfrac{\partial}{\partial x_i}=\sum_{i=1}^n \dot{u}_i(t)\dfrac{\partial }{\partial x_i}=\dfrac{dX}{dt}$$
You finally recover the formula : 
$$\dfrac{d}{dt}g_p(u(t),u(t))=\dfrac{d}{dt}g_{\gamma(t)}(X,X)=2g_{\gamma(t)}(\dfrac{DX}{dt},X)=2g_p(\dfrac{dX}{dt},X)=2g_p(u'(t),u(t)).$$
