We perform a comparative experimental and theoretical study of the temperature dependence up to 700 K of the frequency and linewidths of the graphite E1u and E2g optical phonons (~1590 and 1580 cm-1) by infra-red (IR) and Raman spectroscopy. Despite their similar character, the temperature dependence of the two modes is quite different, being, e.g., the frequency shift of the IR-active E1u mode is almost twice as big as that of the Raman active E2g mode. Ab initio calculations of the anharmonic properties are in remarkable agreement with measurements and explain the observed behavior.