We show different notions of convexity for function defined on sub-Riemannian ge- ometries: geodesic convexity, H-convexity, horizontal convexity, viscosity convexity and convexity along vector fields. We first investigate the relations between them and then state some properties for functions convex in these various settings. Joint work with Martino Bardi (Universit`a di Padova).