I get following error message, when I try to run git rebase -i for squashing my commit:
/usr/libexec/git-core/git-sh-setup: line 112: mate: command not found
How does git look for the editor?
From the git-sh-setup file, I can only see this method:
git_editor() {
if test -z "${GIT_EDITOR:+set}"
then
GIT_EDITOR="$(git var GIT_EDITOR)" || return $?
fi
eval "$GIT_EDITOR" '"$@"'
}
There is a setting in
~/.gitconfiglike this:If you have
textmateadded to youPATHthen you can just changed it to:editor = mate.Just make sure that it is added there.
echo $PATHto check if textmate is there.You can also change the configuration option through
git config. The option to chage iscore.editor. For example:to make the setting available in all your repositories add
--globalflag togit configFrom
git help configmanpage: