如何将我的bash脚本的所有命令行参数作为一个参数传递给另一个程序?

pqn*_*pqn 4 git bash

我希望编写一个简单的git脚本,它将运行以下行:

cd <the name of my git repo>
git add *
git add -u
git commit -m "<my comment in the form of a string>"
git push origin master
Run Code Online (Sandbox Code Playgroud)

我是bash脚本的新手,所以这对我来说有点问题.我现有的尝试如下:

#!/bin/sh

cd <my repo name which has no have any spaces>
git add *
git add -u
git commit -m $*
git push origin master
Run Code Online (Sandbox Code Playgroud)

我不太知道如何抛出一个被引号括起来的正确的字符串参数.我目前尝试运行这样的程序:

autogit.sh "Example comment."
Run Code Online (Sandbox Code Playgroud)

如何更改我的脚本以使其适用于多字提交注释?

jer*_*ahd 5

这里最快的答案是在脚本中,提交行应该读取

git commit -m "$*"