3

If I am using the terminal, after staging some changes, I can do:

git commit --amend --no-edit

This will insert the staged changes on the previous commit. The editor to edit the message was not open to do it.

If I try the same on Magit, I can stage (s), commit (c), and amend (a). At this point, there is a window to edit the previous commit message.

Of course, I can simply press C-c C-c to finish the process without changing anything. It would have the same effect as using the --no-edit flag.

But, is there a way to use the --no-edit flag in Magit so that this edition window is not even necessary?

6

That's exactly what c e (“extend”) does.

And conversely, to change the commit message without amending the commit with the staged changes, there's c w (“reword”).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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