If $f$ is a smooth function in $\mathbb{R}^n$, then for any $x\in\mathbb{R}^n$, we have $$f(y)-f(x)=\int_{0}^{1}{\frac{d}{dt}(f(x+t(y-x))dt}=\int_{0}^{1}{\sum_{i=1}^{n}{\frac{\partial f(x+t(y-x))}{\partial (y_i-x_i)}\frac{d(t(y_i-x_i))}{dt}}dt}=\displaystyle\int_{0}^{1}{\sum_{i=1}^{n}{(y_i-x_i)\cdot \frac{\partial f(x+t(y-x))}{\partial(y_i-x_i)}}dt}$$
Now if I try to do something similar on a n-dimensional riemannian manifold $(M,g)$, $f:M\to\mathbb{R}$ and a geodesic $\gamma:[0,1]\to M$, with $\gamma(0)=x$ and $\gamma(1)=y$, then $$f(y)-f(x)=\int_{0}^{1}{\frac{d}{dt}(f(\gamma(t)))dt}$$ So, (I suppose that) we have $\frac{d}{dt}f(\gamma(t))=g(\gamma(t))(\frac{\partial}{\partial x_i} f(\gamma),\dot{\gamma}(t))$ But I'm really confuse with this, cause I need some chart or not?
As one of the comments on this post has indicated, there is no need to introduce a Riemannian metric to this smooth manifold in order to prove the identity in question. It follows directly from the chain rule and fundamental theorem of calculus on $\mathbb{R}$. Given a curve on your manifold $\gamma: [0,1] \rightarrow M$ where $\gamma(0) = x$ and $\gamma(1) = y$ and a smooth function $f:M \rightarrow \mathbb{R}$, we see that: $$f(y) - f(x) = (f\circ\gamma)(1) - (f\circ\gamma)(0) = \int_0^1 (f\circ\gamma)'(t)dt.$$
In fact, this equality is true for any once differentiable path (not just a geodesic) on your manifold from $x$ to $y$, and thus is a path independent identity.