Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
2.4k views
in Technique[技术] by (71.8m points)

macos - git: Aborting commit due to empty commit message (editor: atom)

When I try to commit something, not using "-m", I get this message immedately. I changed my default editor to atom with "-w" set, also tried "-W".

git config --global core.editor -w

Using vim, it works just fine...

I'm running OSX Yosemite.

So, how can I get this to work?

Edit: Atom opens properly, but the error message gets posted before it does.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

The Atom Editor Git Integration page, in the "Commit Editor" section states that you must pass the --wait flag as part of the editor command:

git config --global core.editor "atom --wait"

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...