Работая в Powershell, моя основная цель состоит в том, чтобы отменить слияние соавтора.
Когда я запускаю git revert -m 1 <SHA of merge>
git возвращает:
hint: Waiting for your editor to close the file... C:\Users\Hugh\emacs\bin\runemacs.exe:
C:UsersHughemacsbinrunemacs.exe: command not found
error: There was a problem with the editor 'C:\Users\Hugh\emacs\bin\runemacs.exe'.
Please supply the message using either -m or -F option.
Я перезагружал свой компьютер и откатывал репо, но получил тот же результат.
После некоторого поиска в Google я решил попробовать изменить свой редактор по умолчанию с emacs на nano и запустил:
git config --list
, что вернуло:
core.symlinks=false
core.autocrlf=true
core.fscache=true
color.diff=auto
color.status=auto
color.branch=auto
color.interactive=true
help.format=html
rebase.autosquash=true
http.sslcainfo=C:/Program Files/Git/mingw64/ssl/certs/ca-bundle.crt
http.sslbackend=openssl
diff.astextplain.textconv=astextplain
filter.lfs.clean=git-lfs clean -- %f
filter.lfs.smudge=git-lfs smudge -- %f
filter.lfs.process=git-lfs filter-process
filter.lfs.required=true
credential.helper=manager
core.editor=nano.exe
user.email=hghklly@gmail.com
user.name=Hugh
core.editor=C:\Users\Hugh\emacs\bin\runemacs.exe
core.repositoryformatversion=0
core.filemode=false
core.bare=false
core.logallrefupdates=true
core.symlinks=false
core.ignorecase=true
remote.origin.url=git@github.com:ucfnmyo/SDC_MuseumsProject.git
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
branch.master.remote=origin
branch.master.merge=refs/heads/master
Вы можете видетьчто есть две записи для core.editor
, nano.exe
без пути к файлу и полный путь к файлу для runemacs.exe
.
Я проверил мои локальные и глобальные файлы конфигурации, ни один из них не указал emacs.
содержимое конфигурации в C:/Program Files/Git/mingw64/etc/gitconfig
:
[http]
sslCAInfo = C:/Program Files/Git/mingw64/ssl/certs/ca-bundle.crt
sslBackend = openssl
[diff "astextplain"]
textconv = astextplain
[filter "lfs"]
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
required = true
[credential]
helper = manager
[core]
editor = nano.exe
локальное содержимое конфигурации:
[core]
repositoryformatversion = 0
filemode = false
bare = false
logallrefupdates = true
symlinks = false
ignorecase = true
[remote "origin"]
url = git@github.com:ucfnmyo/SDC_MuseumsProject.git
fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
remote = origin
merge = refs/heads/master
содержимое конфигурации в C:ProgramData/Git/config
:
[core]
symlinks = false
autocrlf = true
fscache = true
[color]
diff = auto
status = auto
branch = auto
interactive = true
[help]
format = html
[rebase]
autosquash = true
Я также проверил настройки по умолчанию для Windows, для .txt
файлов это Блокнот.
Есть предложения (1), как удалить emacs в качестве редактора git по умолчанию, или (2) просто, как обойти эту проблему, чтобы отменить слияние?
Спасибо!