3 ms·
What I do, is I run loop like (1) git blame <file> (2) git blame <uninterestinghash>^ <file> which tells blame to go back to before the hash and do the blame
by grandinj 5y ago
What I do, is I run loop like
(1) git blame <file>
(2) git blame <uninterestinghash>^ <file>
which tells blame to go back to before the hash and do the blame.
I run that loop repeatedly, picking the most recent hash each time (by date/time), until I get back to the change that interests me.
- jacobmischka 5y agoThis seems strictly worse than the method described in the OP?
- grandinj 5y agoIt's more flexible, in that I can ignore all sorts of other commits that have no bearing on the bug I'm chasing. Effectively, I am doing a manual implementation of displaying a "timeline" of commits that apply that code. But whatever works for you :-)
- Liquid_Fire 5y agoYou may wish to look into whether your editor/IDE's git integration already offers this feature (I believe git-gui also has it). It's much more efficient than having to copy/paste hashes back and forth and scrolling through the file every time.