+1
To nie jest błąd

Compatible with Git for rebase -i

Matthew O'Riordan 12 lat temu Ostatnio zmodyfikowane przez Jon Skinner 12 lat temu 3
In my old text editors (vim and Textmate) I had the editor set in an environment variable on OS X to such as EDITOR=vim

When I run git rebase -i, it automatically uses the text editor, and now because I primarily use sublime it loads sublime.

However, unlike Textmate or vim, git rebase -i does not seem to know when Sublime has closed the file, so continues without waiting for Sublime to finish editing. 

You can easily test this by running 
EDITOR=vim git rebase -i HEAD~5
EDITOR=mate git rebase -i HEAD~5
EDITOR=subl git rebase -i HEAD~5

As you will see, with Sublime it does not work.

Matt

Odpowiedź

Odpowiedź
To nie jest błąd
Use -w to wait till the file has been closed
Odpowiedź
To nie jest błąd
Use -w to wait till the file has been closed
Hold on, I don't understand.  How do I tell Git to pass that parameter in?  And why does Sublime behave differently to all other editors.  I've tried git rebase -i -w HEAD~5 and that does not work, so I assume you meant that subl needs the parameter -w.  So if that is the case, how do I tell Git to pass that parameter?
+1
You can use EDITOR='subl -w'