git - Git如何在一行中查看回购的前8个提交?
问题描述
我正在使用 windows powershell,我想在一行中查看 repo 的前 8 个提交。
git log --reverse --oneline
显示我想要的,但太多了。我只想要 8 次提交。
git log --reverse --oneline -8
在一行中显示 8 个,但最后 8 个提交,而我想要前 8 个提交。
如何在一行中显示前 8 个提交?
解决方案
尝试
git log --reverse --oneline --pretty=format:'%h %aI | %s%d [%an]' | head -8
where--pretty=format:'%h %aI | %s%d [%an]'
完全是可选的,但我喜欢拥有它。:)
当然,您也可以更改8
为您想查看的任何数量的提交。
推荐阅读
- c# - XPS 到 PDF 转换
- php - 将对象转换为数组导致 foreach 循环中的错误空响应
- regex - 执行非常大的正则表达式操作的最佳方法是什么?
- c++ - 有没有办法让用户输入在 Visual Studio 中定义数组大小?
- python - 如何在绘图交互式绘图中手动更改标记形状
- python - 向 SQL 查询传递多个参数时 Python 崩溃
- python - Django反向外键
- php - 递归php函数检查是否找到值然后生成唯一值
- blazor - 如何从 Blazor 访问 HTML 画布?
- python-3.x - Tensorflow 实验数据集:UnicodeDecodeError:“utf-8”编解码器无法解码位置 30 中的字节 0xd5:无效的继续字节