使用Apple脚本更新git存储库

三极汉

我想用苹果脚本更新我的git Bitbucket在线存储。这是在Terminal中工作的代码,但是当我运行Apple脚本时却不行。

cd /Users/mainuser/Desktop/Projects git add -A
git commit -m fromAppleScript
git push

制作成苹果脚本:

        say "updating backup"
        do shell script "cd /Users/mainuser/Desktop/Projects git add -A"
        do shell script "cd /Users/mainuser/Desktop/Projects git commit -m fromAppleScript"
        do shell script "cd /Users/mainuser/Desktop/Projects git push"

我有点困惑为什么此代码不起作用。您能帮我解决这个问题吗?

do shell script "cd /Users/mainuser/Desktop/Projects && git add -A && git commit -m fromAppleScript && git push"

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章