Re:On Comments in Code
by pmoleri on Tuesday June 15, 2021 @08:13PM
(#27523274)
VSCode git-lens. Mandatory extension.
Either way, I think both are useful, although for documenting weird code I think code comments are more important. I the commit message you should explain why you change the code. In the code, why it works like that.
[ Parent
| on HN ]
gitlens is incredible. It passively educates on the git history so you learn about how old each section is and who was mostly behind it or worked with it last without ever requiring dedicated effort since it just sits there at the end of the selected line.
I still wouldn't use git as a replacement for comments since git history is wiped out all the time. Moving files or reformatting or a million other things could remove a critical commit message.