我把gedit配置为git core.editor。如何将gedit配置为git core.editor?
git config --global core.editor "gedit"
这工作正常,除非已经有一个gedit窗口打开。在这种情况下,COMMIT_EDITMSG在现有窗口中打开,gedit立即返回。 Git以空的提交消息结束并失败。
此网站(http://fabianschuiki.wordpress.com/2012/05/20/use-gedit-as-git-editor/),建议使用 “的gedit -s -w”,但我没有这些选项(以及--new窗不工作):
$ gedit -V
gedit - Version 2.28.4
$ gedit --help
Usage:
gedit [OPTION...] [FILE...] - Edit text files
Help Options:
-h, --help Show help options
--help-all Show all help options
--help-gtk Show GTK+ Options
--help-sm-client Show session management options
Application Options:
-V, --version Show the application's version
--encoding=ENCODING Set the character encoding to be used to open the files listed on the command line
--list-encodings Display list of possible values for the encoding option
--new-window Create a new toplevel window in an existing instance of gedit
--new-document Create a new document in an existing instance of gedit
--display=DISPLAY X display to use
'''混帐配置--global core.editor “的gedit -w -s”''' – Fortisimo
@Fortisimo好点。我已将您的评论纳入答案中,以获得更多的知名度。 – VonC
安装gedit 3 for linux mint: sudo apt-get install gedit-common/trusty sudo apt-get install gedit/trusty –