Git日志什么都不显示 [英] Git Log Displays Nothing
问题描述
我有许多git存储库(带有提交),并且在运行git log
时每个都不显示任何内容.如果我在项目目录(没有git存储库)之外运行命令,则会得到:
I have a number of git repositories (with commits) and each displays nothing when running git log
. If I run the command outside a project directory (without a git repository) I get:
致命:不是git存储库(或任何父目录):.git
fatal: Not a git repository (or any of the parent directories): .git
我尝试重新安装Git(我现在正在运行1.7.5.4)并重新克隆我的存储库无济于事.有什么想法吗?
I tried re-installing Git (I'm now running 1.7.5.4) and re-cloning my repositories to no avail. Any ideas?
推荐答案
我刚刚遇到了同样的问题,即git log不会为特定文件显示任何内容.原来问题出在Windows所显示的目录名称中,首字母大写,但是git期望首字母是小写.因此,"git log Subdir/file.c"没有产生错误,也没有输出.而"git log subdir/file.c"产生了预期的修订历史.
I've just experienced the same problem, of git log not displaying anything for a particular file. The problem turned out to be Windows was displaying the directory name with an upper-case first letter, but git expected the first letter to be lower-case. So "git log Subdir/file.c" produced no errors and no output. Whereas "git log subdir/file.c" produced the expected revision history.
这篇关于Git日志什么都不显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!