[guided]This is the geometric heart of the proof. The trace of the metric variation is
\begin{align*}
\sum_{i=1}^m g(\nabla^N_{e_i}X,e_i),
\end{align*}
where $v_i$ is a local $\bar g$-orthonormal tangent frame on $M$, $e_i=dF(v_i)$ is its image along the immersion, and $\nabla^N_{e_i}$ denotes covariant differentiation of sections of $F^*TN$ in the base direction $v_i$ using the pullback connection. We split the variation vector field into tangential and normal parts. Define
$X^\top: M \to TM$ to be the unique tangent vector field whose image under $dF$ is the tangential projection of $X$, and define $X^\perp: M \to (F^*TN)^\perp$
by
\begin{align*}
X=dF(X^\top)+X^\perp.
\end{align*}
The tangential component should produce only reparametrization of the surface, so it should become a divergence. To verify this, use the Gauss formula
\begin{align*}
\nabla^N_{dF(Y)} dF(Z)=dF(\nabla^M_YZ)+A(Y,Z),
\end{align*}
where $\nabla^M$ is the [Levi-Civita connection](/page/Levi-Civita%20Connection) of $(M,\bar g)$ and $A: TM \times TM \to (F^*TN)^\perp$ is the [second fundamental form](/page/Second%20Fundamental%20Form). Since $A(v_i,X^\top)$ is normal and $e_i$ is tangent, their $g$-inner product is zero. Hence
\begin{align*}
\sum_{i=1}^m g(\nabla^N_{e_i}dF(X^\top),e_i)
=
\sum_{i=1}^m g(dF(\nabla^M_{v_i}X^\top),e_i).
\end{align*}
Because $F$ induces $\bar g=F^*g$, this equals
\begin{align*}
\sum_{i=1}^m \bar g(\nabla^M_{v_i}X^\top,v_i)
=
\operatorname{div}_{\bar g}(X^\top),
\end{align*}
where $\operatorname{div}_{\bar g}$ is the [Riemannian divergence](/page/Divergence).
Now consider the normal component. Since $X^\perp$ is normal and $e_i$ is tangent, we have
\begin{align*}
g(X^\perp,e_i)=0
\end{align*}
for every $i$. Differentiating this scalar identity in the direction $e_i$ and using metric compatibility of $\nabla^N$ gives
\begin{align*}
0
=
e_i\bigl(g(X^\perp,e_i)\bigr)
=
g(\nabla^N_{e_i}X^\perp,e_i)+g(X^\perp,\nabla^N_{e_i}e_i).
\end{align*}
Therefore
\begin{align*}
g(\nabla^N_{e_i}X^\perp,e_i)
=
-g(X^\perp,\nabla^N_{e_i}e_i).
\end{align*}
Only the normal projection of $\nabla^N_{e_i}e_i$ contributes to this inner product, because $X^\perp$ is normal. By definition of the second fundamental form, that normal projection is $A(v_i,v_i)$. Summing over $i$ gives
\begin{align*}
\sum_{i=1}^m g(\nabla^N_{e_i}X^\perp,e_i)
=
-\sum_{i=1}^m g(X^\perp,A(v_i,v_i)).
\end{align*}
The mean curvature vector is the trace
\begin{align*}
H:=\sum_{i=1}^m A(v_i,v_i),
\end{align*}
so the normal contribution is
\begin{align*}
-g(X^\perp,H).
\end{align*}
Since $H$ is normal, $g(X^\perp,H)=g(X,H)$. Combining the tangential and normal computations yields
\begin{align*}
\frac{1}{2}\operatorname{tr}_{\bar g}\dot{\gamma}
=
\operatorname{div}_{\bar g}(X^\top)-g(H,X).
\end{align*}[/guided]