Here I have opened the git log1 I’m sorry about the mouse cursor – it’s an artefact of selecting the area for the screenshot.First by opening magit (which I linked to F3 key), and then press lL. First l The prefix key is for dealing with the git log, and the second L Want to see the logs for all local branches (and the remote branches they track).
Hypothetically, if we wanted to run more complex log commands, it would be much easier to do so in Magit. when we first press l And wait for a moment, Magit shows us seamless prompts for all the options available:
This means we don’t have to remember exactly what the options are because if we need them, Magit will remind us. some examples:
- To limit to a particular author we type
-AAnd then magit gives us a fuzzy-matched list of all repository authors. We can either browse that list, or type the name of the author we are interested in and press Return to confirm. - To limit the date range of the log, we type
=uAnd then Magit gives us a calendar view in which we can choose a date, or type one in manually. - Then we want a graph view with colors and decorations and no merge commits. It is already enabled by default in this configuration. (Indicated by bold and highlighted flag names.)
- We want to see the file diffstats, so we type
-s. - Oh, and we only care about the files
testssubdirectory, so we type--
To limit to files and then typetestsAnd confirm with refund.
With this configuration, we want to see all branches, including remote branches. Finally upon pressing we get the view b.
This is a high level of searchability for git! I’ve always been a guy who lists in git.txt, but Magit’s search capabilities still teach me many new ways to use Git. But it’s not only searchable, but also quick. Here’s the full sequence of key presses, with ␍ meaning confirm with Return:
l-Akqr␍=u2025-06-01␍-s--tests␍b
It sounds complicated, but remember how we built it: We looked at the signals and chose one option at a time. Now, if it’s a log type that we will use often, we are going to be able to write that spell without even looking at the prompts. It’s worth exploring both And skilled.
The corresponding git command in the shell must have been
$ git log --branches --remote --author=kqr --until=2025-06-01 \
--graph --color --decorate --no-merges --stat -- tests
How will I know? Because It’s right there in the magit log prompt! If Magit had not told me, I would have spent a lot of time going back and forth between the man page and the command line.
People worry that if you use the more interactive interfaces to Git, you’ll become worse at managing the Git command line. This is not the case with Magit. Magit is completely transparent and encourages you to understand what Git commands it is executing under the hood.
This may seem like excessive rant about the git log in an article about rebasing, but there’s a reason for that: the git log is how we’ll understand the structure of our repo. And because in magit, git log is
interactive.
<a href