I'm writing a bash script to add, commit, push all files in a directory.
git add .
read -p "Commit description: " desc
git commit -m $desc
git push origin master
test commit script
error: pathspec 'commit' did not match any file(s) known to git.
error: pathspec 'script"' did not match any file(s) known to git.
git commit -m
You have to do:
git commit -m "$desc"
In the current script,
test is going as commit message and
script are being treated as next arguments.