
我對 git 比較陌生。請問有人可以幫忙git rebase --interactive
正確運行嗎?當我嘗試執行它時它會拋出錯誤。
筆記:我不想卸載 Xcode,除非它是不可避免的(因為有些套件需要它的工具來編譯)。
這是錯誤:
$ 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
這個檔案當然是存在的,是一個可執行的shell腳本,沒有--help
選項。
git version 1.9.3 (Apple Git-50)
答案1
問題是我git rebase -i
沒有被告知要使用什麼編輯器。因此,透過設定1來固定。
我們假設 out 編輯器是vim
(或nano
, 或 w/e)。然後要么
export GIT_EDITOR=vim
(全球的)
或者
git config --global core.editor "vim"
(當地的)
就能解決問題了。