gpt4 book ai didi

git - .gitconfig 中的短日期

转载 作者:太空狗 更新时间:2023-10-29 14:17:47 26 4
gpt4 key购买 nike

如果我添加

[format]
pretty = format:%h %ad %s

到我的 ~/.gitconfig 并输入 git log 我得到:

36f6ac2 2016-05-22 08:55:55 2016 -0400 Wrapped up optimization of network flow.
37b1037 2016-05-19 07:47:29 2016 -0400 Prepared code to be ready for network flow optimization.
476de11 2016-05-18 18:06:45 2016 -0400 Identified a weakness in the code. Must optimize network flow.

如果我输入 git log --date=short 我得到:

36f6ac2 2016-05-22 Wrapped up optimization of network flow.
37b1037 2016-05-19 Prepared code to be ready for network flow optimization.
476de11 2016-05-18 Identified a weakness in the code. Must optimize network flow.

是否可以在 ~/.gitconfig 中永久设置 --date=short 部分?

最佳答案

为了简短起见,你可以执行

git config --global log.date short

或手动将其添加到您的 .gitconfig

[log]
date = short

关于git - .gitconfig 中的短日期,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37376414/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com