Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.



This seems strictly worse than the method described in the OP?


It'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 :-)


You 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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: