Abort Interactive Rebase when VSCode is set as the Git Editor

CTS_AE picture CTS_AE · Sep 19, 2017 · Viewed 7.9k times · Source

I've set VSCode to be my git editor as detailed here.

When I try to do: git rebase HEAD~3 -i it opens a new Code window, and as soon as the interactive rebase VSCode window closes the window that contained the terminal that fired off the command starts to do the rebasing.

As far as I can understand from this the editor needs to fire off an error code to abort the rebase.

I wasn't sure if there's a way to do this in VSCode or if I need to open up an issue/enhancement on their git repository? Or are you supposed to just clear out all the lines and then close it which should be the same? Does this abort it?

Answer

VonC picture VonC · Jun 5, 2020

I wasn't sure if there's a way to do this in VSCode

Three years, there should be a way to abort/cancel a rebase with VSCode 1.46 (May 2020)

Abort in progress rebase

You can now abort an in progress rebase operation using the Git: Abort Rebase command.

See issue 99015 (from issue 72576) and PR 97071.