Как исправить git commit - PullRequest
       1

Как исправить git commit

0 голосов
/ 08 февраля 2019

Несколько дней назад я попытался настроить Sublime Text 3, чтобы он открывался, когда я делал коммит в git, но всегда выдается ошибка, и когда я пытаюсь вернуть vim, я получаю следующее:

MacBook-Air-de-Andres:bin andr3yvlz$ git config --global core.editor vim
warning: core.editor has multiple values
error: cannot overwrite multiple values with a single value
       Use a regexp, --add or --replace-all to change core.editor.

я тоже пытаюсь сделать это:

MacBook-Air-de-Andres:bin andr3yvlz$ git config --replace-all core.editor vim
fatal: not in a git directory
MacBook-Air-de-Andres:bin andr3yvlz$ 

Ошибка коммита:

MacBook-Air-de-Andres:Andr3yvlz andr3yvlz$ git add .
MacBook-Air-de-Andres:Andr3yvlz andr3yvlz$ git commit
hint: Waiting for your editor to close the file... subl -n -w: subl: command not found
error: There was a problem with the editor 'subl -n -w'.
Please supply the message using either -m or -F option.
MacBook-Air-de-Andres:Andr3yvlz andr3yvlz$ 

, если кто-то знает, как настроить возвышенное с помощью git, было бы оченьполезно, и заранее спасибо

1 Ответ

0 голосов
/ 08 февраля 2019

Вы можете попробовать удалить параметр code.editor из ~/.gitconfig и затем добавить его.

$ git config --global --unset-all core.editor
$ git config --global core.editor "vim"
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...