gitalias
gitalias copied to clipboard
Pretty OneLine Reversed
This is my go to one line reversed pretty that also shows branches local and remote
Thanks Gavin!
I agree with you that a good one line log alias is a real help for new users. The intent of the repo is to use ll for summarization of a team's most useful typical info.
I've experimented with two of your ideas for colors, dates, and number limits.
For dates, what I found in practice is that word dates e.g. "2 weeks ago" tend to cause problems because they are relative. A typical example is if a user pastes a git log into an issue tracker, and a week later, someone else reads the tracker. To discover accurate dates, the reader needs to look up every commit date. This gets hairy if the original paste is a subset of a log, such as a git log that's piped to grep to select just some lines. So the teams changed to always use full dates in ISO format. We had similar experiments of what fields go in what order, and we found that date field first works the best for sorting on most systems, and topo-order works best for outputting the most-recent info at top.
For colors, what I found in practice is that people care a lot about colors, and have a wide range of displays, and many of my teams have had someone who's color-blind. Unfortunately "bold" and "dim" colors do not work effectively across many displays. For example, I'm on a top of the line MacBook Pro, using iTerm2, and the default "dim white" color text is just barely visible and not readable effectively.
For number limits, what I found in practice is that the ideal of most users is to use one screenful of information and with line count numbers at left. But at the same time, I see many users pipe to grep or other selecting tools. I haven't yet found a good way to do this (i.e. output one screen if the context is interactive, and output everything if the context is within a pipe) within a git alias, so instead the ll alias doesn't have a max, and I set up my team to pipe to the bat command. Perhaps there's a better way?
The intents of your ol and the existing ll are pretty close, I think. Yes?
See what you think of these ideas, and I would very much appreciate hearing your opinions about them.
Thanks for the reply. I should also add that not all of us see colour equally and my choice of colours might not appeal to many. I will play with ll and see how it goes. A key difference is --reverse which cannot be applied to ll. The intent for the -n 20 is to avoid be caught by the pager which is annoying.