Correct posts

What are commit messages intended for? I always wrote them as an explanation of what I did, but recently I started discussing this with a colleague who writes messages about messages explaining why he did this. Which one is right, or is there another answer?

NOTE. I absolutely do not know if there is a “correct” answer for this. So I called it a wiki community and do not accept the answer. Winners must decide the winner :)

+5
source share
4 answers

As a personal preference, I can say what was done if you look at the differences in the files directly. Why can't I conclude that I'm just looking at the actual changes.

If the changes are significant or complex, then I would include not only the reason, but also a brief overview of how.

+6
source

I think both of them are useful. A quick description of what has changed (“Adding a length check for AddUserForm”) is easier than looking at diff, especially if you are looking at multiple commits. Why the change was made, what error was fixed, etc., Obviously, also very good.

+1
source

, .

[...] , [...] , .

- : , .. , .

+1

- , , , , . , , , . , - .

As someone who has worked on large codebases spanning decades, as well as smaller projects spanning a year or two, I have not found that nothing more annoys when combing commit logs than messages like "oops" or " fixed bug ". If you corrected the error, let us know which one (error number, at least). All this is important for the inevitable forensic examination in the future.

+1
source

All Articles