git/list[1] front-page[2] threads[3] people[4] search[5] about
 

RE: Make commit messages optional

From
rsbecker@nexbridge.com <rsbecker@nexbridge.com>
Date
Apr 8, 2022, 23:32 UTC
Message-ID
<00ca01d84ba0$dd7ee0c0$987ca240$@nexbridge.com>
In-Reply-To
<YlC3devsgmv17PnQ@camp.crustytoothpaste.net>
On April 8, 2022 6:30 PM, brian m. carlson wrote:
Show 46 quoted lines
>On 2022-04-08 at 03:35:04, jurgen_gjoncari@icloud.com wrote:
>> I think that often commit messages are unnecessary. I propose that by
>> default a user should be able to commit without a message.
>
>This topic comes up from time to time and you can see the previous discussion in
>the archives.  The reasons we haven't done this are roughly as follows.
>
>First, writing commit messages is a way of communicating to others about your
>changes, as well as to future you.  In my experience, it is substantially more
>important in software engineering to communicate clearly and effectively than it is
>to write code.  The computer will accept anything that runs, but when you write
>code others must read it and change it, and they must have the appropriate
>context behind those changes to evaluate your changes and to make their own in
>the future.
>We want to encourage good software engineering practices.
>
>Tools like git log use the commit message, and empty commit messages mean that
>viewing the list of commits is completely useless without viewing a diff.  This
>means that functionality such as `git log --graph` is just completely broken.  Writing
>even one line in the commit summary makes a massive difference in the usability
>of these tools.
>
>Users who want this behaviour can use --allow-empty-message or create an alias
>with that option.  The functionality already exists.  I use aliases extensively in my
>development and I know others do as well, so this shouldn't be an impediment if
>you're working on projects where this is acceptable.
>
>> I don't think this would be a problem from the UX point of view,
>> because a user could get a lot of information about a change, from the
>> history of the GitHub repository, such as from the time of change, and
>> seeing the diff.
>
>I certainly hope when you are writing code that you explain your changes
>somewhere.  I know some people who use pull requests prefer to do so in the pull
>request rather than the commit message, but I for one would never accept a
>change that doesn't contain some sort of explanation about why it's valuable or
>relevant somewhere.  I am, unfortunately, not omniscient, so I need people to
>communicate their intentions and decisions to me, and the best way to do that is
>with words.
>
>I should also point out that the GitHub UI is specifically designed to show the
>commit summary in the history view, so GitHub intends for you to write at least
>one line of helpful text (the summary) in this context.
>
>Overall, I don't believe your proposal is likely to gain traction here for the reasons I
>mentioned above, and I personally don't support it.
The commit message is an essential part of why a change was made, in particular for forensics when something goes wrong, or when you are trying to figure out why you did something. Without a commit message, you are saying, "yeah, ok, something happened." It's up there with reporting a bug saying, "It doesn't work", with no additional details - I have customers who do that, and it is not helpful. To be harsh about it, if someone commits something with no or a useless message, I will reject the change with impunity. Not explaining yourself is not helpful to those who come after. It's up there with "Why did you not document your code, when you used single letter variables and strung the whole program on one line because C (or APL) allows it," with an answer along the lines of "Any decent developer should be able to figure out the code." Sorry, but I feel very strongly on the subject that this is not a good idea. If you want to put junk in your commit, that is your business, but expect a significant segment of the population looking at your repo on GitHub to judge harshly. This sounds more like "I don't want to use a version control system, but I have to for some reason, like HR metrics." I know I am being harsh on this, and I apologize in advance for it if I offended anyone, but I would want a way to disable (potentially at build time) this if it ever went forward.

My $0.04 --Randall

Previous: brian m. carlsonNext: Michal Suchánek
Message 12 of 29 in “Make commit messages optional”
  1. jurgen_gjoncari@icloud.comApr 8, 2022
  2. Christian CouderApr 8, 2022
  3. Ævar Arnfjörð BjarmasonApr 8, 2022
  4. Erik Cervin EdinApr 8, 2022
  5. Ævar Arnfjörð BjarmasonApr 11, 2022
  6. Junio C HamanoApr 11, 2022
  7. Michal SuchánekApr 11, 2022
  8. Junio C HamanoApr 11, 2022
  9. Philip OakleyApr 8, 2022
  10. Phillip SusiApr 8, 2022
  11. brian m. carlsonApr 8, 2022
  12. rsbecker@nexbridge.comApr 8, 2022
  13. Michal SuchánekApr 9, 2022
  14. Tao KlerksApr 10, 2022
  15. rsbecker@nexbridge.comApr 10, 2022
  16. rsbecker@nexbridge.comApr 10, 2022
  17. Tao KlerksApr 10, 2022
  18. Jonathan NiederApr 13, 2022
  19. demerphqApr 11, 2022
  20. rsbecker@nexbridge.comApr 11, 2022
  21. Ævar Arnfjörð BjarmasonApr 11, 2022
  22. Tao KlerksApr 11, 2022
  23. Junio C HamanoApr 11, 2022
  24. Michal SuchánekApr 11, 2022
  25. tytsoApr 11, 2022
  26. Ævar Arnfjörð BjarmasonApr 11, 2022
  27. Theodore Ts'oApr 14, 2022
  28. Ævar Arnfjörð BjarmasonApr 14, 2022
  29. Junio C HamanoApr 14, 2022

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.