git rebase --interactive throws an error
The problem is that my git rebase -i
wasn't told what editor to use. Thus, it is fixed by setting one.
Let's claim that out editor is vim
(or nano
, or w/e). Then either
export GIT_EDITOR=vim
(global)
or
git config --global core.editor "vim"
(local)
Would solve the problem.
Credit goes to glenn jackman https://superuser.com/users/4714/glenn-jackman
Related question https://stackoverflow.com/questions/2596805/how-do-i-make-git-use-the-editor-of-my-choice-for-commits
Related videos on Youtube
theoden8
Updated on September 18, 2022Comments
-
theoden8 over 1 year
I'm relatively new to git. Could anyone, please, help running
git rebase --interactive
properly? It throws an error when I try to execute it.Note: I don't want to uninstall Xcode unless it's inevitable (because some packages require it's tools to compile).
Here's the error:
$ git rebase -i /Applications/Xcode.app/Contents/Developer/usr/libexec/git-core/git-rebase--interactive: line 234: -w: command not found Could not execute editor
This file, of course, exists, is an executable shell script and has no
--help
option.git version 1.9.3 (Apple Git-50)
-
glenn jackman almost 9 yearsTangentially, you can use
[0-9]
instead of[0123456789]
-
theoden8 almost 9 years@glennjackman thanks, worked for me. didn't suspect it to be so easy.
-
Daniel B almost 9 yearsIf you have an answer, make it an answer. ;) That being said, I recommend using the Git version available via brew.
-
theoden8 almost 9 years@DanielB You mean me or glenn jackman? Isn't it quite shizo-like to answer questions u ask?
-
glenn jackman almost 9 yearsAnswering your own questions is encouraged -- imagine someone who found your question through google: it would be good to provide that person your solution.
-