Is it possible to use the "exec" mechanism when rebasing with magit?

From the git rebase man page:

   -x <cmd>, --exec <cmd>
       Append "exec <cmd>" after each line creating a commit in the final history. <cmd> will be interpreted as one or more shell commands.

For example, verifying that tests pass when rebasing the manual command might be:

git rebase -x "make test" 

Note: I'm not interested in manually specifying an individual "x" exec in an interactive rebase. I would like the specified command run after each commit when rebasing.

1 Answer 1


No, git rebase --exec isn't currently supported, but adding --exec to the rebase popup should work:

(magit-define-popup-option 'magit-rebase-popup
  ?x "Exec command" "--exec=" #'read-shell-command)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.