我已经将以下代码保存为.sh文件,并从我的根目录执行它:https://gist.github.com/emiller/6769886
有几个错误:
script.sh: line 65: conditional binary operator expected
script.sh: line 65: syntax error near `=~'
script.sh: line 65: `while [[ $1 =~ ^\- ]]; do'然后,当我运行git-rewrite-history命令时,我收到一个错误:
'git-rewrite-history' is not recognized as an internal or external command,
operable program or batch file.非常感谢你的帮助,这里有0 linux的经验。
谢谢。
编辑-我正在使用windows中的bash,这可能与这个问题有关。将尝试在Linux发行版上运行。
发布于 2016-01-07 21:12:52
'git-rewrite-history‘未被识别为内部或外部命令、可操作程序或批处理文件。
您需要设置脚本执行权限:
chmod 777 path/to/git-rewrite-history发布于 2016-01-20 20:39:26
名为git-rewrite-history的bash脚本(即使是在Windows上)必须使用以下命令执行:
git rewrite-history任何名为git-xxx的脚本都可以这样调用(git xxx),只要git-xxx位于%PATH%环境变量引用的文件夹中。
bash脚本将在msys2 bash git会话中执行,即使从简单的Windows CMD shell会话调用也是如此。
你根本不需要Cygwin。
https://stackoverflow.com/questions/34655014
复制相似问题