How to go from local to global isometry Let $M$ be a connected complete Riemannian manifold, $N$ a connected Riemannian manifold and $f:M \to N$ a differentiable mapping that is locally an isometry. Assume that any two points of $N$ can be joined by a unique geodesic (parameterized by arc-length of velocity $1$) of $N.$ Prove that $f$ is injective and surjective (and therefore, $f$ is a global isometry.)

Thanks for all the comments.
Injectivity: Let $p\neq q \in M,$ and let $\gamma:I \to M$ be a geodesic $\gamma(0)=p$ and $\gamma(1)=q.$ Cover $\gamma(I),$ by open sets $U_{\alpha}$ where $f|_{U_{\alpha}}:U_{\alpha} \to f(U_{\alpha})$ is an isometry, by compactness, there is a finite covering of $U_i$'s or equivalently, a partition of $I$ where $0=t_0<t_1<...<t_n=1.$ Thus, $\frac{D}{dt}(\frac{d(f \circ \gamma)}{dt}|_{[t_i,t_{i+1}]})=df (\frac{D}{dt}(\frac{d\gamma}{dt}|_{[t_i,t_{i+1}]}))=df(0)=0,$ therefore, $\frac{D}{dt}(\frac{d(f \circ \gamma)}{dt})$ on $I$ implying that $f \circ \gamma$ is a geodesic in $N$ joining $f(p)$ to $f(q).$ If $f(p)=f(q),$ then $f \circ \gamma$ would be a closed geodesic, contradicting the uniqueness assumption.
Surjectivity:  Uniqueness of geodesics joining any two points of $N$ implies that $N$ is complete, then $exp_q:T_qN \to N$ is surjective for any $q \in N.$  
Let $p \in M$ be fixed. There is an open neighborhood $U \in M$ containing $p$ s.t. $f|_U : U \to f(U)$ is an isometry. We have $f(exp_p(v))=exp_{f(p)}(df_p(v))$ for all $v \in T_pM.$ Let $q \in N$ be arbitrary.  There is a $w \in T_{f(p)}N$ s.t. $exp_{f(p)}(w)=q.$ Since, $df_p$ is an isomorphism of vetor spaces, there is a $u \in T_pM$ s.t. $df_p(u)=w.$ Hence, $ f(exp_p(v))=exp_{f(p)}(df_p(v))=q$ and we’re done. 
P.S. Sometimes triviality doesn't show itself, when exhaustion has captured our feelings:)
