[guided]We want to relate $\int_T K\, dA$ to angles at vertices. The Cartan identity $d\omega_T = K\, dA$ already turns $\int_T K\, dA$ into $\int_{\partial T} \omega_T$ via Stokes, so the task reduces to interpreting $\omega_T$ along $\partial T$. The geodesic equation is what makes this clean.
Pick a unit-speed parametrisation $\gamma$ of $\partial T$ — possible because $\partial T$ is piecewise smooth and each smooth piece is a geodesic arc, hence has well-defined arc length. The unit tangent $\gamma'(s) \in T_{\gamma(s)}M$ is a unit vector, so it lies on the unit circle of $T_{\gamma(s)}M$ which we parametrise by angle relative to $e_1$. Lifting this angle through the covering $\mathbb{R} \to S^1$ gives a continuous function $\phi$ on the smooth pieces (at vertices the tangent jumps, so $\phi$ has jumps there).
Why does $\dot\phi = \omega_T(\gamma')$ hold? Differentiate $\gamma' = \cos\phi \, e_1 + \sin\phi\, e_2$ covariantly along $\gamma$:
\begin{align*}
\nabla_{\gamma'} \gamma' &= -\sin\phi\, \dot\phi\, e_1 + \cos\phi\, \nabla_{\gamma'} e_1 + \cos\phi\, \dot\phi\, e_2 + \sin\phi\, \nabla_{\gamma'} e_2 \\
&= -\sin\phi\, \dot\phi\, e_1 - \cos\phi\, \omega_T(\gamma')\, e_2 + \cos\phi\, \dot\phi\, e_2 + \sin\phi\, \omega_T(\gamma')\, e_1 \\
&= \bigl(\dot\phi - \omega_T(\gamma')\bigr)\bigl(-\sin\phi\, e_1 + \cos\phi\, e_2\bigr),
\end{align*}
where we used $\nabla e_1 = -\omega_T \otimes e_2$ and $\nabla e_2 = \omega_T \otimes e_1$. On a geodesic arc the LHS vanishes, and the vector $-\sin\phi\, e_1 + \cos\phi\, e_2$ is the unit normal to $\gamma'$, in particular nonzero, so the scalar coefficient must vanish: $\dot\phi(s) = \omega_T(\gamma'(s))$, i.e. $\gamma^* \omega_T = d\phi$ as $1$-forms on each open arc.
The hypotheses of [Stokes' Theorem](/theorems/1530) are satisfied: $T$ is a compact smoothly embedded $2$-manifold with corners, $\omega_T$ is a smooth $1$-form on a neighbourhood $U_T \supset T$, and the corner set of $\partial T$ has measure zero. Stokes gives $\int_T d\omega_T = \int_{\partial T} \omega_T$, and pulling back to the parametrisation,
\begin{align*}
\int_{\partial T} \omega_T = \sum_{i=1}^3 \int_{e_i} \gamma^* \omega_T = \sum_{i=1}^3 \int_{e_i} d\phi.
\end{align*}
Here a *simple piecewise smooth Jordan curve* in $\mathbb{R}^2$ means a continuous injective map $\eta: [0, L] \to \mathbb{R}^2$ with $\eta(0) = \eta(L)$ that is smooth except at finitely many parameter values — this is the regularity class to which the chart image $\psi(\partial T)$ belongs.[/guided]