In a vertical channel driven by an imposed horizontal temperature gradient, numerical simulations (Gao et al., Phys. Rev. E, vol. 88, 2013, 023010; Phys. Rev. E, vol. 91, 2015, 013006; Phys. Rev. E, vol. 97, 2018, 053107) have previously shown steady, time-periodic and chaotic dynamics. We explore the observed dynamics by constructing invariant solutions of the three-dimensional Oberbeck–Boussinesq equations, characterizing the stability of these equilibria and periodic orbits, and following the bifurcation structure of the solution branches under parametric continuation in Rayleigh number. We find that in a narrow vertically periodic domain of aspect ratio 10, the flow is dominated by the competition between three and four co-rotating rolls. We demonstrate that branches of three- and four-roll equilibria are connected and can be understood in terms of their discrete symmetries. Specifically, the $D_4$ symmetry of the four-roll branch dictates the existence of qualitatively different intermediate branches that themselves connect to the three-roll branch in a transcritical bifurcation due to $D_3$ symmetry. The physical appearance, disappearance, merging and splitting of rolls along the connecting branch provide a physical and phenomenological illustration of the equivariant theory of $D_3$–$D_4$ mode interaction. We observe other manifestations of the competition between three and four rolls, in which the symmetry in time or in the transverse direction is broken, leading to limit cycles or wavy rolls, respectively. Our work highlights the interest of combining numerical simulations, bifurcation theory and group theory, in order to understand the transitions between and origin of flow patterns.