git submodule update --init安装dot-emacs文件时出错

时间:2013-08-24 13:10:53

标签: git emacs git-submodules dot-emacs

我尝试为emacs(https://github.com/dhaley/dot-emacs)安装dotfiles配置。我做了所有喜欢指示(通过brew下载和安装emacs的macport,repsitory的克隆),现在当我使用命令git submodules update --init时出现以下错误:

$git submodule update --init
fatal: reference is not a tree: a2bcba9a92873900055dcaff640e4d31a650947e
fatal: reference is not a tree: 05f9cebc64842efa2968d49adb08330d15c7ffe8
fatal: reference is not a tree: 89611c7a6947787bf2f591e64e22b7444ea5ed41
Unable to checkout 'a2bcba9a92873900055dcaff640e4d31a650947e' in submodule path 'override/bbdb'
Unable to checkout '05f9cebc64842efa2968d49adb08330d15c7ffe8' in submodule path 'site-lisp/auctex'
Unable to checkout '89611c7a6947787bf2f591e64e22b7444ea5ed41' in submodule path 'site-lisp/drupal-mode'

其中一些在.gitmodules文件中没有条目,我手动添加了它。但现在我不知道如何解决这个错误。我是emacs和hole dotfile的新手,所以如果你能给我一个暗示它会很棒(在stackoverflow上我发现Git submodule head 'reference is not a tree' error但是我不明白这是不是我的问题以及如何修复它)

PS:我发送邮件给Damon Haley,这是存储库的维护者,带有一个链接,因为我找不到讨论github存储库问题的论坛。

最诚挚的问候并感谢大家对这个热心社区的贡献,

丹尼斯

1 个答案:

答案 0 :(得分:2)

fatal: reference is not a tree: 89611c7a6947787bf2f591e64e22b7444ea5ed41  
Unable to checkout 'a2bcba9a92873900055dcaff640e4d31a650947e' in submodule path 'override/bbdb'

这意味着子模块引用的repo(此处为git://git.savannah.nongnu.org/bbdb.git)不包含该提交。
一个可能的原因是当子模块repo看到它的历史发生变化时(例如通过push --force

除了分叉https://github.com/dhaley/dot-emacs之外没什么可做的,并且使用似乎兼容的提交更新你的fork(在探索git://git.savannah.nongnu.org/bbdb.git之后)。这样,你可以提交一个pull请求,要求父repo dot-emacs的维护者用你将找到的SHA1更新该子模块的引用。