  Recent nuclear magnetic resonance and specific heat measurements have
provided concurring evidence of spontaneously broken rotational symmetry in the
superconducting state of the doped topological insulator Cu$_x$Bi$_2$Se$_3$.
This suggests that the pairing symmetry corresponds to a two-dimensional
representation of the $D_{3d}$ crystal point group, and that Cu$_x$Bi$_2$Se$_3$
is a nematic superconductor. In this work, we present a comprehensive study of
the upper critical field $H_{c2}$ of nematic superconductors within
Ginzburg-Landau (GL) theory. Contrary to typical GL theories which have an
emergent U(1) rotational symmetry obscuring the discrete symmetry of the
crystal, the theory of two-component superconductors in trigonal crystals
reflects the true $D_{3d}$ crystal symmetry. This has direct implications for
the upper critical field. First, $H_{c2}$ of trigonal superconductors exhibits
a sixfold anisotropy in the basal plane. Second, when the degeneracy of the two
components is lifted by, e.g., uniaxial strain, $H_{c2}$ exhibits a twofold
anisotropy with characteristic angle and temperature dependence. Our thorough
study shows that measurement of the upper critical field is a direct method of
detecting nematic superconductivity, which is directly applicable to
recently-discovered trigonal superconductors Cu$_x$Bi$_2$Se$_3$,
Sr$_x$Bi$_2$Se$_3$, Nb$_x$Bi$_2$Se$_3$, and Tl$_x$Bi$_2$Se$_3$.
