git log --branch 在普通存储库和裸存储库上有不同的行为吗?
我想使用 git log 命令从存储库中提取自指定分支上的给定日期以来的更改列表。
为此,我发现以下语法似乎工作正常:
git log --since=2011-10-01 --branches=mybranch
上述命令在我的工作站(Ubuntu 10.04,GIT 1.7.7.2)中的克隆存储库上运行良好,但在克隆的主存储库上输出错误日志创建的。主存储库是托管在 Centos 5.5、GIT 1.7.3.4 上的裸 GIT 存储库。 基本上,主存储库不会显示许多最近的提交。
我不明白这是否是预期的行为,差异是由于主存储库是裸露的,还是由于 GIT 版本不同而导致的不同行为。
I'd like to use the git log command to extract the list of changes from a repository since a given date on a specified branch.
For the purpose I found the following syntax which seems to work fine:
git log --since=2011-10-01 --branches=mybranch
The above command works fine on a cloned repository in my workstation (Ubuntu 10.04, GIT 1.7.7.2) but outputs a wrong log on the main repository from which the clone has been created. The main repository is a bare GIT repository hosted on Centos 5.5, GIT 1.7.3.4.
Basically, the main repository does not show a number of the most recent commits.
I don't understand if this is the expected behavior and the difference is due to the fact that the main repo is bare, or if this is a different behavior due to the fact that the GIT version is not the same.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
按照“Does git log --branches work?”的建议,我建议在注释中:
即:
--branches
选项。OP giamma 报告它有效。
Following the suggestion of "Does git log --branches work?", I have suggested in the comments:
I.e:
--branches
option when accessing the logs of a given branch.The OP giamma reports it works.