2 ms·
Agreed, with the caveat that a tangled commit history can be overwhelming to a beginner. Probably the only time I really want to recommend a Git GUI is for visu
by nerdponx 3y ago
Agreed, with the caveat that a tangled commit history can be overwhelming to a beginner. Probably the only time I really want to recommend a Git GUI is for visualizing the commit graph. I think GitUp does a really good job of making it navigable and understandable, but is unfortunately Mac-only: https://gitup.co/ https://gitup.co/
If you're interested, here's my version of this:
[alias]
## Pretty log graph
log-oneline = log --decorate=short --date='format-local:%a %F %H:%M' --pretty='tformat:%C(auto)%h%C(reset) %C(auto,blue)[%ad]%C(reset)%C(auto)%d%C(reset) %aN: %s'
log-graph = log-oneline --topo-order --graph
reflog-oneline = log-oneline --walk-reflogs
lg = log-graph
lgl = log-graph --branches --tags
lgr = log-graph --branches --tags --remotes
lga = log-graph --all
For anyone who doesn't want to dig around in the git-log(1) man page, the relevant format placeholder are:
%C(col) Change color to "col"
%h Abbreviated commit hash
%ad Author date (formatted as per --date)
%d Ref name (like with --decorate)
%aN Author name
%s "Subject" (first line of commit message)
The difference with the usual `--decorate --pretty=oneline --abbrev-commit` options is that my version includes the date and author name, which can be really helpful when navigating a long commit history and/or a project with multiple contributors. Without it, I often found myself wondering "who did that, and when did they do it?". The --topo-order option also helps here.