Reverse output of a command
I'm trying to get the reversed output from
git log --branches --graph --oneline
(Sadly, you can't pass --reverse
to it, because it says it's incompatible with --graph
.)
Is there a way to reverse the output of the command?
Solution 1:
On Linux, add | tac
at the end of your line.
Solution 2:
If you don't have tac
(like on Mac), you should be able to use | tail -r
as explained in this answer on the sister site Unix & Linux.