5

I am trying to follow the suggestion Can you GPG sign old commits?

λ git rebase --exec 'git commit --amend --no-edit -n -S' -i develop

But getting

error: unknown option `amend'

I am running git version 2.23.0.windows.1

phuclv
  • 30,396
  • 15
  • 136
  • 260

1 Answers1

7

With the use of λ in the prompt string I guess you're using cmder as the terminal with cmd as the shell. In cmd single quotes aren't the quoting symbol so the exec string isn't passed as a single parameter. You need to change to double quotes:

git rebase --exec "git commit --amend --no-edit -n -S" -i develop

Or better change to powershell or other shells (you should already have bash if you install git on Windows). They recognize ' as the quote character so you don't need to change anything, and you get more features

phuclv
  • 30,396
  • 15
  • 136
  • 260