5 ms·
Well, `git` is still the primary way I interact with a git repository, and `git log` shows the entire commit message by default. So I don't run into this proble
by mb7733 3y ago
Well, `git` is still the primary way I interact with a git repository, and `git log` shows the entire commit message by default. So I don't run into this problem.
If some "modern" git frontend is only capable of displaying the first line of a commit message, then this is a problem with that tool, not git itself.
(I'm also not convinced this is a limitation of all modern tooling...)
- schacon 3y agoI can't tell if this is engaging with trolls or not, but I can't imagine that all of your interactions with your codebase are via `git log` with no other flags. Even the with the normal Git CLI that most of us use daily, most of us use `--oneline` or whatever to simplify useful calculations and visualizations like `--graph`, etc. But we're talking here mostly about code archeology, learning about the history of a block of code, so this comment seems somewhat ridiculous in that context.
- bee_rider 3y agoIs it possible that you’ve been hit by https://xkcd.com/2501/ https://xkcd.com/2501/ ? git log | less /whatever Works OK for those of us who don’t know any git flags.
- account42 3y agoWhy an explicit `| less`? Git already uses a pager by default.
- fl0ki 3y agoThe only sets of arguments I use to git log regularly: * `git log branch` because I want to cherrypick or checkout parts of another branch. * `git log --stat` because what files changed can be a big clue for what I'm looking for. * `git log -- dir1/ file1/` because I only care about commits to a certain part of the tree. Other than that, `git log` already provides so much information to /search or even `grep` through that I can't think of any other flags I use regularly, and if you don't use them regularly you forget them. The real GOAT that people are sleeping on is `git rebase --interactive` where you can go back and edit part of your branch to clean it up before rebasing or merging towards main. The cleaner the commits are, the more useful they become later for other tools like log, merge, rebase, cherry-pick, bisect, etc.
- ycombobreaker 3y agoA rebase to clean up your branch is great, and I lean on my team to do this. Unfortunately it's impossible to automate, because it amounts to craftsmanship. I've seen larger teams fall back to squash-merging, which at least discards checkpoint/broken/WIP commits. But it loses the nuance of more complex changes performed in logical stages.
- mb7733 3y agoI don't know how my comment was understood to mean that I am unfamiliar with git. My point was that those of us that use the git CLI have no issues seeing the rest of a commit message besides the first line, and in fact this is the default.
- mb7733 3y ago> I can't imagine that all of your interactions with your codebase are via `git log` with no other flags. When did I say anything like that? My point is just that the `git log` command, by default, shows the full commit message. The same goes for `git show`. So a user of the git CLI will regularly see complete commit messages, unless they purposefully request a different format. So, it is not some inherit problem in git that the complete commit message is hard to find. That's just a limitation of certain Git frontends.
- keybored 3y ago> I can't tell if this is engaging with trolls or not, […] that most of us use daily, most of us use `--oneline` You speculate that someone who uses git log without listing (or complaining about) all their flags are a troll?
- TheRealPomax 3y agoperiodic reminder that `gitk` exists, and has come with git since... pretty much forever? If you're reading `git log`, you really owe it to yourself to run `gitk` at least once to see what you've been missing for over a decade now.
- mb7733 3y agoWhat gave you the impression that I haven't heard of gitk?
- TheRealPomax 3y agoWhen someone mentions an approach, and someone else mentions a different approach, neither comment is "for one person only".
- ayewo 3y agoWell, I’ve heard of gitk too but gitk is not available by default on my default installation of macOS so there’s that.
- TheRealPomax 3y agoI'm not sure why anyone would use default installations of any developer tooling on Mac? Was the first thing you did when you finished initial startup on your mac not "install homebrew, then install the most up to date versions of git, python, etc. etc."?
- WorldMaker 3y agogitk is great if you love subway diagrams and want a built-in tool for it. There's so much power in `git log --first-parent` and recursing into drilldowns that current UIs, including gitk, are bad at expressing as a workflow.