Solution to Discrete Log as a Commitment
Obviously, this scheme is not perfectly hiding. But assuming the discrete logarithm is hard, receiver or an adversary can't determine the committed message prior to reveal, so I believe this provides computational hiding.

If the receiver had no other information about $m$, then you would be correct.
On the other hand, we typically assume that he has some information; the acid test is &quot;if the receiver knew the committed value was either $m_0$ or $m_1$, he still cannot determine which it is from the commitment&quot;.
Obviously, your approach (or, for that matter, any deterministic method) cannot fulfill that requirement; you need to include some randomness to meet this criteria.