【发布时间】:2012-01-18 22:48:27
【问题描述】:
我正在编写一个 bash 脚本来添加、提交、推送目录中的所有文件。
#!/bin/bash
git add .
read -p "Commit description: " desc
git commit -m $desc
git push origin master
我收到以下错误:
$ ./togithub
Commit description:
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.
Everything up-to-date
我不确定这是否是阅读文本时出现的问题(echos 很好)或将其传递给 git commit -m。
【问题讨论】: