What happens if the usual geodesic equation on an n-manifold is directly modified from a source dimension 1 space (giving a path) to a dimension 2 space (giving a surface). I suspect that this gives a totally geodesic surface, but I was hoping for somewhere to discuss modifications (adding extra terms like a connection on the 2D source space) and the integrability conditions quite explicitly.

The equations for $\gamma:\mathbb{R}^2\to\mathbb{R}^n$ are of the form $$ \frac{\partial^2 \gamma^i}{\partial t^j\partial t^k}=\Xi^p_{jk} \frac{\partial \gamma^i}{\partial t^p} -(\Gamma^i_{pq}\circ\gamma) \frac{\partial \gamma^p}{\partial t^j} \frac{\partial \gamma^q}{\partial t^k} $$ where $\Gamma$ is the Christoffel symbols on $\mathbb{R}^n$ and $\Xi$ is the Christoffel symbols on $\mathbb{R}^2$. Possibly add some tensor evaluated at $\gamma$ as well...

This must be well known in differential geometry, just not to me as a non-expert, so please give a reference rather than just down voting.