How can I get input for git commit message using variable?

Hi, campers!

I’m now encountered with bash script, while trying to make git automation file.
I tried to get input from user, and then use it for git commit message.
It is being executed without an error. But when I check the commit message in GitHub, the message is “$commitMessage”(variable name), not what I input, such as “error fixed”.

Can you help me to find out what I missed at this script?

Thanks in advance for your help!

Current bash file is as below.

git add .
echo "Enter commit message: "
read commitMessage
git commit -m "$commitMessage"
git push

That should be working, and when I create a test repo everything does work as expected.

Go into your repository and check the output of git log. Do you see $commitMessage, or do you see the message you typed in?