[英]git log fails if I use --graph --decorate and --oneline options
[英]When I have git log print out as oneline, how do I reverse it?
我有git log的別名:
git log --reverse --oneline --pretty=format:'-%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset'
但我也希望將其反轉,因為有時滾動頂部不方便。
從您已經擁有的命令中--reverse
git log --oneline --pretty=format:'-%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset'
也許您出於某種原因想將其反轉多次,所以
your_command | perl -e 'reverse <>'
能夠幫助 ;)
或者
your_command | tail -r
或@evnu建議
your_command | tac
或者當您想每行都敬重時,您可以
your_command | perl -nlE 'chomp;say scalar reverse'
特別是最后一個很好,例如:
date | perl -nlE 'chomp;say scalar reverse'
版畫
3102 TSEC 32:95:91 41 yaM euT
ps:只在開玩笑.. :)
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.