git在一行中提交消息? [重复]

问题描述 投票:0回答:1

这个问题在这里已有答案:

有没有办法在一行中显示整个提交消息?

这是我的提交消息:

git log -1

here this is a change
it is a empty change

输出:

here this is a change it is a empty change
git commit git-commit
1个回答
0
投票

我尝试了以下方法:

git show -s --format='%B' <Commit ID> | tr -d '\n'; echo

参考:Print git commits body lines joined in one line

© www.soinside.com 2019 - 2024. All rights reserved.