我运行这个git pull命令,它在Unicode文件名上卡住了
& git pull
From .
* branch master -> FETCH_HEAD
First, rewinding head to replay your work on top of it...
error: The following untracked working tree files would be overwritten by checkout:
test-sample-files/MByte/CJK-UTF8-MultiByte/樣品套裝/サンプル.java
test-sample-files/MByte/CJK-UTF8-MultiByte/樣品套裝/의 견본을 뽑다.java
test-sample-files/MByte/japanese/これはサンプルのテストであり、できるだけ早く修正する必要があります.java
test-sample-files/MByte/japanese/サンプル.java
test-sample-files/MByte/korean/의 견본을 뽑다.java
Please move or remove them before you can switch branches.
Aborting
could not detach HEAD但是,git status会报告工作目录是干净的。
$ git status
# On branch dev/experimental
# Your branch and 'master' have diverged,
# and have 3 and 96 different commit(s) each, respectively.
#
nothing to commit (working directory clean)没有"git add“、"git reset”或"rm ...*“可以解决此问题。任何帮助都是非常感谢的。
附言:我在Mac (10.5)上运行"git version1.7.5.4“,这是我能找到的最新的leopard预构建版本。
发布于 2012-04-18 06:23:56
您的文件在工作树的当前状态下处于未跟踪状态。这就是git add或git rm什么也不做的原因。
用git stash save --untracked存储它们,它们将被保存在一个存储库中。在拉出之后,你可以使用git stash pop恢复,但你可能会与它们发生冲突,因为拉出将在可能的不同内容中检出主题。
由于您坚持使用Git1.7.5,因此stash不知道--untracked选项,所以您可以
git ls-
文件或使用git add -u添加它们,然后提交
发布于 2012-04-19 00:29:43
堆栈溢出和workaround to handle Mac OS X UTF-8 encoded file names with git!中描述了导致此问题的原因!也进行了描述。
https://stackoverflow.com/questions/10199993
复制相似问题