git commit opens up two editor panes instead of one to enter message
When i run
git commit it opens up 2 vi editor panes instead of one. The top pane is totally blank. The bottom pane is what I expect to see when running
git commit. Every time I want to commit I have to close the top pane using
:q before I can write my commit message.
Has anyone seen something like this before? What is the solution?
- Where do piped files go on Windows?
- How to fix:code indent should never use tabs in Vi
- My command line locks up when making a commit with GIT
- Git command output shows special characters
- Getting “Vim: Caught deadly signal ILL” when trying to do basic git operations
- Adding a git commit message using vi on OS X
2 Solutions collect form web for “git commit opens up two editor panes instead of one to enter message”
I don’t know why this worked, but I commented out a line in my .vimrc that changed the colorscheme.
colorscheme solarized. Seems to have fixed the problem somehow. I guess the git commit wants to use a vi without customization and for some reason opens up a secondary pane when a different colorscheme is present.
Fixed by putting the
colorscheme solarized line in my .vimrc in an if block to see if it is called by
if $_ != 'git commit' colorscheme solarized endif
I believe the issue is that Git doesn’t know what editor you want to use, so it runs
vi by default, which launches Vim in compatibility mode.
This could also happen with other applications, so you could set the
EDITOR environment variables (or/as well as the git-specific
GIT_EDITOR) in your
~/.bashrc to fix this:
Alternatively, you can configure git itself to use vim:
git config --global core.editor "vim"