Here’s another minor git convenience which I’m blogging as a letter to my future self who needs to look it up again: git log with the filenames included, and git log with a bit of graphical annotation for the history structure.

These are just my brief notes. If you want a beautifully readable introduction to git, I suggest Julia EvansHow Git Works”.

Git commands have just so many options, so I can never remember what is what, but here are two alias entries from my ~/.gitconfig: They stand for file log and graph log, respectively.

[alias]
        flog = log --name-status
        glog = log --oneline --decorate --graph

With these aliases, git flog produces a log which lists the affected files and their status (added, modified, deleted, …) for each commit, which is nice for the “what files did I touch then?” question.

For a compact view, git glog only provides the one-line-summary message and tries to draw a history graph. In the case of linear history, that comes down to starting each line with a *, but git alligator history is a little more decorated – but still readable.