0 votes
 
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

 
NOT A BUG
updated 1 year ago
Use -w to wait till the file has been closed
 
0
Matthew O'Riordan
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?
Translation provided by Microsoft translator:

 
0
Jon Skinner
You can use EDITOR='subl -w'
Translation provided by Microsoft translator:

 
0
Matthew O'Riordan
Thanks, works a treat
Translation provided by Microsoft translator:

Community stats

  • 27,583People
  • 3,828Feedback
  • 5,698Comments
  • 64,512Votes