In this https://math.stackexchange.com/questions/2568300/gauss-bonnet-like-statement-connecting-parallel-transport-and-curvature question, it was discussed that the rotation of a vector that is parallely transported along a piecewise smooth simple loop $\gamma$ in a $\textbf{2-dimensional}$ manifold is exactly the integral of the gaussian curvature over the interior of the loop. The proof seems to be similar to the one of the $2$-dimensional Gauss-Bonnet theorem.

I am interested in a high-dimensional analogue of this result, let's say in the case of hypersurfaces, i.e. for an $m$-dimensional manifold M embedded in $\mathbb{R}^{m+1}$ (assume also that $m$ is even if necessary). In this case (Chern-)Gauss-Bonnet theorem becomes like theorem 5.4.3 here https://people.math.ethz.ch/~salamon/PREPRINTS/difftop.pdf and a more general statement (not just for hypersurfaces) are theorems 4.2 and 4.4 (for manifolds with boundary) here https://math.berkeley.edu/~alanw/240papers00/zhu.pdf.

I wait for a result of the type $\int_{interior} K dvol_M= rot_{\gamma} \mod something$. I am not sure what "something" should be. I think that this is connected to my lack of understanding about the sum of angles of a geodesic triangle in a high-dimensional manifold. Any idea or reference is highly appreciated.