如何获取git分支中给定作者的提交消息的历史记录?
我想获得git分支中给定作者的提交消息的历史记录。除了通过编程解析日志,还有什么简单的方法可以实现它吗 更新: 以下是为我所做的同样的事情:如何获取git分支中给定作者的提交消息的历史记录?,git,git-log,Git,Git Log,我想获得git分支中给定作者的提交消息的历史记录。除了通过编程解析日志,还有什么简单的方法可以实现它吗 更新: 以下是为我所做的同样的事情: git log --author='some author' --pretty=oneline --abbrev-commit git log --author='some author' --oneline git日志-帮助中提到了以下内容: Commit Formatting --pretty[=<format>],
git log --author='some author' --pretty=oneline --abbrev-commit
git log --author='some author' --oneline
git日志-帮助中提到了以下内容:
Commit Formatting
--pretty[=<format>], --format=<format>
Pretty-print the contents of the commit logs in a given format, where <format> can be one of oneline, short, medium, full, fuller, email, raw and
format:<string>. See the "PRETTY FORMATS" section for some additional details for each format. When omitted, the format defaults to medium.
Note: you can specify the default pretty format in the repository configuration (see git-config(1)).
--abbrev-commit
Instead of showing the full 40-byte hexadecimal commit object name, show only a partial prefix. Non default number of digits can be specified
with "--abbrev=<n>" (which also modifies diff output, if it is displayed).
This should make "--pretty=oneline" a whole lot more readable for people using 80-column terminals.
--no-abbrev-commit
Show the full 40-byte hexadecimal commit object name. This negates --abbrev-commit and those options which imply it such as "--oneline". It also
overrides the log.abbrevCommit variable.
--oneline
This is a shorthand for "--pretty=oneline --abbrev-commit" used together.
您必须提供在GIT repo中注册的作者姓名。或者作者的电子邮件地址也可以 e、 g git log-author=详细信息。git log-author= 如果说你在找亚当·布朗 git log-author=adam git log-author=adam git log-author=Brown 这也行。如果不需要任何空格,则引号是可选的 如果您打算在repo中搜索所有分支,而不仅仅是当前提交的祖先,则添加-all 因此,要列出adam或damian的提交,可以执行如下正则表达式: git日志-作者=\damian\\\\adam\ 或
git log-committer=\damian\\\\amit\你到底是什么意思?特定作者提交时的所有提交消息?@jornsharpe更改为消息。谢谢。你可以选择使用他们的电子邮件地址。谢谢贾斯汀。我已经更新了答案。
git log --author='Bharat Biswal'
git log --author='bharat.biswal@gmail.com'