So I'm not sure how deck transformations work into this problem. I've established the following so far. Let $\pi:\tilde{M}\rightarrow M$ be the universal covering map. We may suppose that $M$ is compact and complete, and we endow the pullback metric on $\tilde{M}$. We also know that the fundamental group of $M$ has infinitely many elements, so this tells us that $\tilde{M}$ is non-compact. Knowing this we can form a geodesic ray $\gamma:[0,\infty)\rightarrow \tilde{M}$ situated at $\gamma(0)=p\in\tilde{M}$. By completeness we can complete $\gamma$ to be a geodesic on $\mathbb{R}$. I want to show that $\gamma$ is a geodesic line. Here is where I don't know how deck transformations come into play. I've messed around with it a little bit and I haven't gotten anywhere. Any advice on what I might need to show to get on the right track?
Definition:(Geodesic ray)A geodesic ray is a map $\gamma:[0,\infty)\rightarrow M$ such that $\gamma\mid_{[0,t]}$ is a minimizing geodesic for all $t>0$.
Definition:(Geodesic line)A geodesic line is a map $\gamma:\mathbb{R}\rightarrow M$ such that $\gamma\mid_{[a,b]}$ is a minimizing geodesic for all $a,b\in\mathbb{R}$.
${\bf Z}=(a)\subset \pi_1(M)$ And there exists a shortest loop of unit speed $c : [0,l]\rightarrow M,\ c(0)=c(l)$ in $M$ representing $a$ Note that it is a geodesic. If $\pi : \widetilde{ M} \rightarrow M$ is a universal covering then let $p\in \pi^{-1} c(0) $. Then we have a lifting curve $c_1:=\pi^{-1} c$ starting at $p$ Let $ p_1:=c_1(l) $ And we have a lifting $c_2:=\pi^{-1}c$ starting $p_1$ That is we have $p_i$ repeatedly. Since $\pi$ is local isometry so lifting curves are geodesic and their union $\widetilde{c}$ is a geodesic of infinite length.
So remaining is to show that it is minimizing. Choose $p_{-i},\ p_i$ Assume that their distance is strictly less that $2il$ If $c'$ is the minimizing geodesic between them, then the projection $\pi (c ')$ is a curve representing $2ia$ If shortest loop representing $2ia$ has length $L$ less than $2il$, then we have a loop of length $ L/2i$ representing $a$. It is a contradiction.
That is $\widetilde{c}|_{[-il,il]}$ is minimizing. Hence it is a line.