Is it possible to have a small shell script to replace $EDTIORfor git and svn?
$EDTIOR
So, when a person who is not familiar with vi or emacs commits and forgets to add -m "fixed the foo bug" parameters, he will not open an editor that does not know how to exit, but instead he will just tell you
-m "fixed the foo bug"
Please confirm the offer that contains this message:
and the user simply writes a small sentence, gets into it, and he exits.
git config. editor core . , ++ git cygwin:
config
editor
core
[core] editor = git-core-editor.sh
git-core-editor.sh ( cygwin/bin):
git-core-editor.sh
cygwin/bin
#!/bin/sh "C:/Program Files (x86)/Notepad++/notepad++.exe" -multiInst -notabbar -nosession `cygpath -w -a "$*"`
nano.
nano
bash script:
#!/bin/sh set -e # Show the message template so the user knows what up cat $1 echo "Type your message, or press return to abort:" head -n1 > $1