Search code examples
gittextmate

Git editor goes asynchronous?


I setup textmate to be my editor in git:

$ git config --list --global | grep editor
core.editor=mate

When I do commands like:

$ git commit --amend 

or

$ git rebase -i <hash>

The editor is opened as expected, but the it appears to be opened asynchronously, for when I look back at the command prompt I see this:

[mybranch 099f0ea] My new changes
 Date: Tue Jan 28 19:11:52 2020 -0800
 3 files changed, 5 insertions(+), 9 deletions(-)

The changes appear to have been committed even though I haven't saved any changes to the file in my editor. Also, saving any changes to the file in the editor have no effect. Its almost as if the editor was opened asynchronously.

Any ideas why this happens?


Solution

  • In Terminal, say:

    git config --global core.editor "mate -w"
    

    (Source: https://help.github.com/en/github/using-git/associating-text-editors-with-git)