3 ms·
> whenever I'm trying to figure out where something went wrong, commit are not the thing I look at, it's the code changes in the commit And how do you locate t
by scintill76 4y ago
> whenever I'm trying to figure out where something went wrong, commit are not the thing I look at, it's the code changes in the commit
And how do you locate the commit of interest? I usually search the commit messages…
- JoeyBananas 4y agoGit bisect is one option, but I usually find myself using "git show HEAD~n" directly.
- mejutoco 4y agoGit log -Sterm to find commits where term was added or removed.
- scintill76 4y agoWhat if you only remember that the change you're interested in was fixing an issue with the frombulator, not that it did so by changing the "term"? A good commit message in this case would probably mention the frombulator, so you would find it by search and then see that the "term" was changed.
- mejutoco 4y agoI would try `git log -Sfrombulator`, maybe a comment shows up? It is what I usually do, not a solution to all problems :) My commit messages look like small essays (after the first summary line, of course), so I think we agree.
- thinking4real 4y agoAll of the answers to this will amount to being able to find them in some other way. No one will answer what to do if you have no idea of what’s in the code (bc it’s old or you’re new to this repo). Basically, this idea is a failure but some people think it’s neat so they’ll come up with contrived justifications that make no sense.
- u801e 4y agoRunning a command like git blame on a file you plan to modify and running git show on the sha1 value can help you find relevant commits.