4

When I issue the following command on 16.04 with Git 2.7.4 from the apt repository

git commit -sS --status

I get the following result:

Aborting commit due to empty commit message.

I have configured the Git global configuration as follows:

jonathan@Aristotle:~/EclipseWorkspaces/AGI$ git config --global -l
user.name=Jonathan Gossage
user.email=jgossage@gmail.com
core.editor=gedit

Given this configuration I expected Git to bring up the gedit editor to allow me to enter the commit message. This is the first commit into an empty repository. The git status is included as an attachment.

  • Sorry but I could not find how to add an attachment. – Jonathan May 19 '16 at 2:15
5

Configure your editor with -w option, also add -s to run a new instance of gedit on each call:

git config --global core.editor "gedit -w -s"

or (because of this bug in gedit) use a call with long arguments:

git config --global core.editor "gedit --wait --new-window"
| improve this answer | |
  • I tried this with the following response: jonathan@Aristotle:~/EclipseWorkspaces/AGI$ git commit -sS --status Failed to register: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: Method "DescribeAll" with signature "" on interface "org.gtk.Actions" doesn't exist error: There was a problem with the editor 'gedit -w -s'. Please supply the message using either -m or -F option. – Jonathan May 19 '16 at 3:18
  • Check this. It seems some versions of gedit had a bug. One post suggests as a workaround to use long arguments gedit --wait --new-window in the command call (instead of -w -s). – techraf May 19 '16 at 3:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.