I once calculated the commutators, based on the book Notes on Lie Algebras, by Samelson.

Suppose $\alpha_1$ and $\alpha_2$ are the simple roots, with $\alpha_1$ the long root and $\alpha_2$ the short root.

Thus all positive roots are
\begin{equation*}
\alpha_1, \alpha_2, \alpha_1 + \alpha_2, \alpha_1 + 2 \alpha_2, \alpha_1 + 3 \alpha_2, 2 \alpha_1 + 3\alpha_2
\end{equation*}

Here is a list of all commutators of $G_2$. Because the list is long, I organize it as follows.

*Commutators of the form $[h , e ] $*

If $\alpha = r \alpha_1 + s \alpha_2$ then $[ h_{\alpha_1} , e_{\alpha} ] = (2 r -s ) e_{\alpha}$ and $[ h_{\alpha_2} , e_{\alpha} ] = (-3 r + 2 s ) e_{\alpha}$

*Commutators of the form $[ e_{\alpha}, e_{-\alpha} ] $ *

Because of the antisymmetry of the commutator, I only write down the commutators for $\alpha \ge 0$
\begin{align*}
[e_{\alpha_2},e_{-\alpha_2}] & = h_{\alpha_2} &
[e_{\alpha_1},e_{-\alpha_1}] & = h_{\alpha_1} \\
[e_{\alpha_1+\alpha_2},e_{-\alpha_1-\alpha_2}] & = 3 h_{\alpha_1}+h_{\alpha_2}&
[e_{\alpha_1+2 \alpha_2},e_{-\alpha_1-2 \alpha_2}] & = 3 h_{\alpha_1}+2 h_{\alpha_2}\\
[e_{\alpha_1+3 \alpha_2},e_{-\alpha_1-3 \alpha_2}] & = h_{\alpha_1}+h_{\alpha_2}&
[e_{2 \alpha_1+3 \alpha_2},e_{-2 \alpha_1-3 \alpha_2}] & = 2 h_{\alpha_1}+h_{\alpha_2}
\end{align*}

*Commutators of the form $[ e_{\alpha}, e_{\beta} ] $ with $\alpha + \beta$ a root and $\alpha + \beta \neq 0$ *

Because of the antisymmetry of the commutator, I only write down the commutators for $\alpha \le \beta$
\begin{align*}
[e_{-\alpha_2},e_{-\alpha_1}] & = -e_{-\alpha_1-\alpha_2} & [e_{-\alpha_1-2 \alpha_2},e_{\alpha_1+\alpha_2}] & = -2 e_{-\alpha_2} \\ [e_{-\alpha_2},e_{-\alpha_1-\alpha_2}] & = -2 e_{-\alpha_1-2 \alpha_2} & [e_{-\alpha_1-2 \alpha_2},e_{\alpha_1+3 \alpha_2}] & = -e_{\alpha_2} \\ [e_{-\alpha_2},e_{-\alpha_1-2 \alpha_2}] & = -3 e_{-\alpha_1-3 \alpha_2} & [e_{-\alpha_1-2 \alpha_2},e_{2 \alpha_1+3 \alpha_2}] & = e_{\alpha_1+\alpha_2} \\ [e_{-\alpha_2},e_{\alpha_1+\alpha_2}] & = 3 e_{\alpha_1} & [e_{-\alpha_1-3 \alpha_2},e_{\alpha_2}] & = e_{-\alpha_1-2 \alpha_2} \\ [e_{-\alpha_2},e_{\alpha_1+2 \alpha_2}] & = 2 e_{\alpha_1+\alpha_2} & [e_{-\alpha_1-3 \alpha_2},e_{\alpha_1+2 \alpha_2}] & = -e_{-\alpha_2} \\ [e_{-\alpha_2},e_{\alpha_1+3 \alpha_2}] & = e_{\alpha_1+2 \alpha_2} & [e_{-\alpha_1-3 \alpha_2},e_{2 \alpha_1+3 \alpha_2}] & = -e_{\alpha_1} \\ [e_{-\alpha_1},e_{-\alpha_1-3 \alpha_2}] & = -e_{-2 \alpha_1-3 \alpha_2} & [e_{-2 \alpha_1-3 \alpha_2},e_{\alpha_1}] & = e_{-\alpha_1-3 \alpha_2} \\ [e_{-\alpha_1},e_{\alpha_1+\alpha_2}] & = -e_{\alpha_2} & [e_{-2 \alpha_1-3 \alpha_2},e_{\alpha_1+\alpha_2}] & = -e_{-\alpha_1-2 \alpha_2} \\ [e_{-\alpha_1},e_{2 \alpha_1+3 \alpha_2}] & = e_{\alpha_1+3 \alpha_2} & [e_{-2 \alpha_1-3 \alpha_2},e_{\alpha_1+2 \alpha_2}] & = e_{-\alpha_1-\alpha_2} \\ [e_{-\alpha_1-\alpha_2},e_{-\alpha_1-2 \alpha_2}] & = 3 e_{-2 \alpha_1-3 \alpha_2} & [e_{-2 \alpha_1-3 \alpha_2},e_{\alpha_1+3 \alpha_2}] & = -e_{-\alpha_1} \\ [e_{-\alpha_1-\alpha_2},e_{\alpha_2}] & = 3 e_{-\alpha_1} & [e_{\alpha_2},e_{\alpha_1}] & = e_{\alpha_1+\alpha_2} \\ [e_{-\alpha_1-\alpha_2},e_{\alpha_1}] & = -e_{-\alpha_2} & [e_{\alpha_2},e_{\alpha_1+\alpha_2}] & = 2 e_{\alpha_1+2 \alpha_2} \\ [e_{-\alpha_1-\alpha_2},e_{\alpha_1+2 \alpha_2}] & = -2 e_{\alpha_2} & [e_{\alpha_2},e_{\alpha_1+2 \alpha_2}] & = 3 e_{\alpha_1+3 \alpha_2} \\ [e_{-\alpha_1-\alpha_2},e_{2 \alpha_1+3 \alpha_2}] & = -e_{\alpha_1+2 \alpha_2} & [e_{\alpha_1},e_{\alpha_1+3 \alpha_2}] & = e_{2 \alpha_1+3 \alpha_2} \\ [e_{-\alpha_1-2 \alpha_2},e_{\alpha_2}] & = 2 e_{-\alpha_1-\alpha_2} & [e_{\alpha_1+\alpha_2},e_{\alpha_1+2 \alpha_2}] & = -3 e_{2 \alpha_1+3 \alpha_2} \\
\end{align*}

A comment about the signs

After much trial and error I found that the signs in the commutators above are given by the following quite compact expression

1) Define a function $F: \text{Roots} \to \{0,1\}$

\begin{equation*}
F(\alpha) = 0 \quad\text{if}\quad \alpha \in \big\{(0,1),(2,3),(0,-1),(-2,-3)\big\} \quad\text{and}\quad F(\alpha) = 1 \quad\text{otherwise}
\end{equation*}

2) Define a total order $\prec$ as

\begin{align*}
- \alpha_1 - 2 \alpha_2 \prec - \alpha_1 \prec
2 \alpha_1 + & 3 \alpha_2 \prec
- \alpha_1 - 3 \alpha_2 \prec
- \alpha_1 - \alpha_2 \prec
- \alpha_2 \prec \\
& \prec \alpha_2 \prec \alpha_1 + \alpha_2 \prec \alpha_1 +3 \alpha_2 \prec -2 \alpha_1 - 3 \alpha_2 \prec \alpha_1\prec \alpha_1 + 2 \alpha_2
\end{align*}

3) The sign in the commutator $[e_{\alpha} , e_{\beta} ] = n_{\alpha \beta}e_{\alpha+\beta}$ is then given by

\begin{equation*}
(-1)^{F(\alpha) F(\beta)} \quad\text{if}\quad \alpha\prec\beta
\end{equation*}
and
\begin{equation*}
- (-1)^{F(\alpha) F(\beta)} \quad\text{if}\quad \alpha\succ\beta
\end{equation*}

I wrote down some details in a blog post.