git rebase -i with gvim doesn't wait for me to save?

旧巷老猫 提交于 2020-05-24 04:40:31

问题


When using git rebase -i with core.editor=gvim, the message "Successfully rebased and updated refs/heads/master." appears immediately, before I actually save the file that allows me to pick/reword/squash... commits. And gvim pops up with a message that the file is no longer available.

Is this a config issue on my end, or does setting core.editor to graphical vim just not work?


回答1:


When gVim is running in GUI (as opposed to inside the terminal), they will typically launch themselves in the background, so you can continue to work in the terminal after they are launched. This behaviour is normal when Vim is launched through its gvim shortcut. To disable it, use the -f option that forces Vim to stay in foreground, and not relinquish control back to the calling process until it is finished.

core.editor="gvim -f"


来源:https://stackoverflow.com/questions/43383123/git-rebase-i-with-gvim-doesnt-wait-for-me-to-save

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!