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.
#!/bin/bash git add . echo "Enter commit message: " read commitMessage git commit -m "$commitMessage" git push