我在一台 Windows 机器上使用 git
,我正在尝试将它与 cygwin 终端和 Git Bash 一起使用。当我尝试将主题分支 rebase 为 master 时,出现以下神秘错误:
☻~/code/project $ git rebase master
First, rewinding head to replay your work on top of it...
fatal: cannot convert from etf8 to utf8
这是什么意思,我该如何解决? Google 对此给出了零结果。
我的语言环境是 en_US.UTF-8
,但我没有任何 LC
环境变量。
~ $ env | grep LC
~ $ env | grep LANG
LANG=en_US.UTF-8
这是我使用的版本:
~ $ git --version
git version 1.7.9
最佳答案
我认为您的存储库中有一些损坏的文件或困惑的配置。
我的 google-fu 没有找到一个名为 etf8
的字符编码。我认为它是 utf8
在字母 u
中有一位错误(第五位):
在我看来,这是 git
报告的 fatal error 的最可能原因。
它可能可以通过编辑内部文件或 repo 中的某些配置值来修复(但不幸的是,我对 git
内部结构不太满意,不知道该去哪里找)。
关于windows - 为什么 git rebase 说 "fatal: cannot convert etf8 to utf8"?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11332497/