4 ms·
A commit message can give you a better understanding of why a line of code is the way it is. It's like a mini README for your commit. Suppose you're making a c
by daveFNbuck 6y ago
A commit message can give you a better understanding of why a line of code is the way it is. It's like a mini README for your commit.
Suppose you're making a change that has a few paragraphs of commit message explaining what you're doing and why. As well as a large well-commented change in a primary file, you've made some small incidental changes to other files. You're not going to include comments with all the context and explanation on each of these small changes.
If I'm looking at one of the files you incidentally touched later and don't understand why your change is there, I can check the git blame and have a good understanding of why the code looks like that now.