We construct combinatorial bases of the $T$-equivariant cohomology $H_{T}^{\bullet }(\unicode[STIX]{x1D6F4},k)$ of the Bott–Samelson variety $\unicode[STIX]{x1D6F4}$ under some mild restrictions on the field of coefficients $k$. These bases allow us to prove the surjectivity of the restrictions $H_{T}^{\bullet }(\unicode[STIX]{x1D6F4},k)\rightarrow H_{T}^{\bullet }(\unicode[STIX]{x1D70B}^{-1}(x),k)$ and $H_{T}^{\bullet }(\unicode[STIX]{x1D6F4},k)\rightarrow H_{T}^{\bullet }(\unicode[STIX]{x1D6F4}\setminus \unicode[STIX]{x1D70B}^{-1}(x),k)$, where $\unicode[STIX]{x1D70B}:\unicode[STIX]{x1D6F4}\rightarrow G/B$ is the canonical resolution. In fact, we also construct bases of the targets of these restrictions by picking up certain subsets of certain bases of $H_{T}^{\bullet }(\unicode[STIX]{x1D6F4},k)$ and restricting them to $\unicode[STIX]{x1D70B}^{-1}(x)$ or $\unicode[STIX]{x1D6F4}\setminus \unicode[STIX]{x1D70B}^{-1}(x)$ respectively. As an application, we calculate the cohomology of the costalk-to-stalk embedding for the direct image $\unicode[STIX]{x1D70B}_{\ast }\text{}\underline{k}_{_{\unicode[STIX]{x1D6F4}}}$. This algorithm avoids division by 2, which allows us to re-establish 2-torsion for parity sheaves in Braden’s example, Braden and Williamson [‘Modular intersection cohomology complexes on flag varieties’, Math. Z.272(3–4) (2012), 697–727].