Hacker News new | ask | show | jobs
by solardev 580 days ago
In Jetbrains IDEs, you can select several lines of code and view the commit history for just those lines: https://www.jetbrains.com/help/idea/investigate-changes.html...

This is extremely useful for me when debugging something that I didn't write, to see who worked on it in the past – just those few lines – and what they changed. From there, then I can look at that whole commit and the ones right before/after it to get a better context if needed. But most of the time, just being able to see how those specific lines have changed really helps me understand the code, without the noise of an entire git history or even just file history, since often times it's other parts of the file that were changed. This feature limits it to only the lines I care about.

I wouldn't be able to work without this feature. VScode can do it too via the Gitlens extension. I don't think it's built-in to the git CLI, but you can kinda get a similar effect with some effort: https://stackoverflow.com/questions/10816578/can-git-show-hi....

Overall it's just much easier in Jetbrains (as many things are).