git rebase --interactive에서 오류가 발생합니다.

git rebase --interactive에서 오류가 발생합니다.

나는 상대적으로 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

물론 이 파일은 존재하며 실행 가능한 쉘 스크립트이며 --help옵션이 없습니다.

git version 1.9.3 (Apple Git-50)

답변1

문제는 git rebase -i어떤 편집기를 사용해야 하는지 알려주지 않았다는 것입니다. 따라서 하나를 설정하면 해결됩니다.

vim외부 편집자가 (또는 nano, 또는 w/e) 라고 주장해 봅시다 . 그렇다면

export GIT_EDITOR=vim(글로벌)

또는

git config --global core.editor "vim"(현지의)

문제를 해결할 것입니다.

신용 거래글렌 잭맨에게 가다https://superuser.com/users/4714/glenn-jackman

관련 질문 https://stackoverflow.com/questions/2596805/how-do-i-make-git-use-the-editor-of-my-choice-for-commits

관련 정보