Git: How to skip to the end of a rebase and keep all changes so far?

Viewed 62

I'm in the middle of an interactive rebase and I've already amended several commits.

I have several remaining commits that I've marked to edit, but I've decided that I don't want to edit them anymore.

How can I end the rebase (early, if you would) but keep the changes I've made so far?

git rebase --abort will end the rebase and erase all of the changes I've made, and git rebase --continue is too tedious to type for every remaining commit I have to edit.

1 Answers

You can run:

git rebase --edit-todo

To edit the instructions of the remaining commits. You'll then be able to change all the commits you marked as edit into pick. Then just run:

git rebase --continue

And it will carry on without stopping (unless conflict) until the end.

Related