我希望编写一个简单的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)
如何更改我的脚本以使其适用于多字提交注释?
| 归档时间: |
|
| 查看次数: |
3122 次 |
| 最近记录: |