First approach, through Git configuration:
git -c core.editor=true rebase --continue
Or, with environment variables:
GIT_EDITOR=true git rebase --continue
This will override the editor that git uses for message confirmation. true command simply ends with zero exit code. It makes git continue rebase as if user closed interactive editor.
On Windows, you would need to use CMD /V /C
cmd /V /C "set "GIT_EDITOR=true" && git rebase --continue
In both OS, you can use aliases
# Linux
alias grc="GIT_EDITOR=true git rebase --continue"
# Windows
doskey grc=cmd /V /C "set "GIT_EDITOR=true" && git rebase --continue"
Then a simple grc will be enough to continue the rebase without the editor popping up.
David Gardiner adds in the comments:
In PowerShell, use:
$env:GIT_EDITOR = "true -and git rebase --continue"then tidy up with
$env:GIT_EDITOR = ""
To set that globally (without alias), maybe consider this approach:
specifying the core.commentChar detected from the .git/rebase-merge/message (here @):
git --global core.commentChar @
There is also GIT_SEQUENCE_EDITOR=:, but you cannot always leave it at that value, because that would break all the rebase operation where you want an editor.
That is why having an alias remains the most flexible and accurate approach, rather than relying on a global setting which might break other rebase editor use cases.