首页 > fatal: bad revision 'git用户名'

fatal: bad revision 'git用户名'

我想看指定文件的git log,于是我用sublime text去操作如下:Tools=>Git=>This file=>log,但是结果是error:

fatal: bad revision 'Xujiajun(这是我的git用户名)'

我google了几把之后,发现没人遇到我这样的问题,只有类似:

“git - fatal: bad default revision 'HEAD'”,

这个和我的问题应该是不一样的。

如果有哪一位大神,朋友能帮我,先谢谢了。

处女贴o~。


这是 Sublime Git 插件的 bug。

它在 history.py 的 73 ~ 74 行有一段代码写错了。

# the commit hash is the first thing on the second line
self.log_result(item[1].split(' ')[0])

按注释所说,理应第二行是 commit hash,但实际格式是这样:

Commit commend. (hash)
Huan Du (my@email)
Date

其实第一行的最后一段才是 hash。

所以去联系原作者吧,项目地址:https://github.com/kemayo/sublime-text-2-git

P.S. 你是不是用的 Sublime 3?这个插件是给 Sublime 2 用的。

【热门文章】
【热门文章】