How do I find the geodesics of the cylinder.

I know that they will be a helix between the two points on the cylinder. As the cylinder is locally isomorphic to the plane and the geodesic on a plane is a straight line. So if we wrapped the plane into a cylinder the straight line would become a helix.

Thanks for any help