To expand Ryan Budney's comment, the geodesics of $(M,g)$ are the projection on the base $M$ of the integral curves for the vector field $S_g$ on $TM.$
$S_g$ is the unique vector field on $TM$ which is at the same time :
special (i.e. it represents a $2^\textrm{nd}$-order edo on $M$, or equivalently its integral curves are the tangential lifting of their projection on the base) and
horizontal (i.e. it is a section of the horizontal distribution on $TM$.)
Because $S_g$ is a spray (i.e. $\mathcal{L}_Z S_g=S_g,$ where $Z$ is the Euler vector filed), it is called the geodesic spray of $(M,g).$
It can be realized even that $S_g$ is the hamiltonian vector field of the kinetic energy $K_g:v\in TM\to\tfrac{1}{2}g(v,v)\in\mathbb{R}$ with respect to the pull-back through $g^\flat$ of the canonical symplectic form on $T^\ast M.$
So $S_g$ preserves the sphere bundles, and we get that if $M$ is compact then $S_g$ is complete.
Quotienting $\textrm{pr}_1:\mathbb{R}\times TM\to\mathbb{R},$ under $F_\mathbb{R}\times TM\to TM,$Through the flow of $S_g,$ we getits integral curves (which are the identification requestedtangential lifting of their projection on the base) are indentified with $TM$.