February 24, 2014

Configure core.editor in git to enter tag messages

Some git commands (e.g., git tag) need a message from the user, and git automatically opens a text editor to write the message. However, if your editor (core.editor) is not configured, then you may end up with an error message like below.

fatal: no tag message?

Here are the git commands to configure a text editor depending on OS.

In Linux: git config --global core.editor "vim"

In Windows: git config --global core.editor "'C:/Program Files (x86)/Notepad++/notepad++.exe' -multiInst -notabbar -nosession -noPlugin"

References: ref1 ref2

No comments:

Post a Comment