Mic*_*eim 4 shell git command-line
我正在尝试遵循建议Can you GPG Sign old commits?
\n\xce\xbb git rebase --exec \'git commit --amend --no-edit -n -S\' -i develop\nRun Code Online (Sandbox Code Playgroud)\n但得到
\nerror: unknown option `amend\'\nRun Code Online (Sandbox Code Playgroud)\n我正在运行 git 版本2.23.0.windows.1
通过在提示字符串中使用 ,\xce\xbb我猜您正在使用 cmder 作为终端,并使用 cmd 作为 shell。在 cmd 中,单引号不是引用符号,因此 exec 字符串不会作为单个参数传递。您需要更改为双引号:
git rebase --exec "git commit --amend --no-edit -n -S" -i develop\nRun Code Online (Sandbox Code Playgroud)\n或者更好地更改为 powershell 或其他 shell(如果你在 Windows 上安装 git,你应该已经有 bash)。它们被识别\'为引号字符,因此您无需更改任何内容,并且可以获得更多功能