导出到文本文件时带有换行符的git日志

标签 git line-breaks

如何为自定义 git 日志添加换行符?

git log --pretty=tformat:"%ai %s" > log.log

我想在 %s 之后换行

最佳答案

你可以使用%n作为一个新行:

git log --pretty=tformat:"%ai %s%n" > log.log

关于导出到文本文件时带有换行符的git日志,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26873622/

相关文章:

Git merge 两个具有历史记录的 git 存储库

git - 如何将远程存储库添加到我自己的 git 存储库

Visual Studio Team Services 中的 Git,Visual Studio 2012 项目 - 无法从构建部署

php - 将换行符转换为 <li> 标签

ios - 标签上不能换行

github 宕机后 Git 推送失败

git - 如何确定 Git 是将文件处理为二进制文件还是文本文件?

python - 基于用户参数的输出格式

ruby - 用 BR 替换 unicode 换行符

php - 通过 PHP 从 MySQL 长文本到 HTML 的换行符