How do I configure jEdit to work with git rebase -i in Windows?

32 views Asked by At

Anybody successfully doing a git rebase -i in Windows using jEdit? How do you have your git configure core.editor set? It's just giving me errors about being unable to find work files in the .git subdirectories.

1

There are 1 answers

0
Vampire On

If jEdit is already running, then invoking it again just tells the running instance what to do and quits.

If you want to use jEdit as editor for some tool that waits for the editing to finish like Git, you need to use the -wait parameter.

Without the -wait parameter Git is preparing a file with the TODO list for the rebase and tells jEdit to open it. As the started process immediately quits, Git thinks the editing is finished, processes the TODO list and deletes the TODO list file. jEdit then tells you that the file that is opened was deleted.

So if you always want jEdit as Git editor, you can set core.editor to jedit -wait or the GIT_EDITOR environment variable to the same value.

If you just want to use jEdit as editor sometimes, you can for example configure a Git alias named j either to the value !GIT_EDITOR='jedit -wait' git or to the value !git -c core.editor='jedit -wait'. Then you can use git j rebase-or-any-other-command to temporarily use jEdit on a command-by-command basis.