Note: I've seen that essentially the same question title has been posted here, but it does not answer my doubts.
Let $g: \mathbb{R}^n \to \mathbb R^m $ be a differentiable function. Then the total derivative of $g$ at $p \in \mathbb{R}^n $ is the linear function $Dg_p \in L(\mathbb{R}^n , \mathbb{R}^m )$. Therefore it can have a matrix representation once we specify bases for $ \mathbb{R}^n $ and $ \mathbb{R}^m $. Let $\{e_i\}_{i=1}^n, \{f_i\}_{i=1}^m$ be the standard bases of $\mathbb R^n, \mathbb R^m$ respectively.
In wikipedia I've seen that the Jacobian matrix $J$ is the matrix representation of $Dg_p$. There the Jacobian is defined as
$$ [J]_{i,j} = \partial_j g_i, $$
where $\partial _i := \partial/\partial e_i $ and $g_i := e_i^* \circ g $ are the component functions ($e^*_i$ is the dual vector of $e_i$). I'm interested in making the connection between $J$ and $Dg_p$.
By definition of partial derivatives, we know that $\partial _if (p) = Dg_p (e_i) $. Hence it is that the $i$th column of $J$ is simply $\partial _i f (p)$. This is also shown in the Wikipedia page.
However, the wikipedia also shows that
$$ J = \begin{pmatrix} \nabla ^Tg_1 \\ \vdots \\ \nabla ^T g_m \end{pmatrix} ,$$
where, according to Wikipedia, '$ \nabla ^T g_i$ is the transpose of the gradient of the $i$th component'.
I do not understand how this equality came about, neither do I understand how can we reach the statement $J_{ij} = \partial _j g_i $ from simply the fact that $g$ is differentiable at $p$ and its total derivative is $Dg_p$