在 Git 中获取提交列表以及提交消息和哈希
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/6703238/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 05:41:21 来源:igfitidea点击:
Getting a list of commits along with the commit message and hash in Git
提问by naiquevin
I have a project in Git. What I want is a list of only the commit messages and the hashes between two commits and store it in a text file. Is there any command that does this ?
我在 Git 中有一个项目。我想要的是仅包含提交消息和两次提交之间的哈希值的列表,并将其存储在文本文件中。是否有任何命令可以执行此操作?
Thanks.
谢谢。
回答by Noufal Ibrahim
git log --pretty=oneline commit1...commit2 > file