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

Re: Draft of Git Rev News edition 101

From
Kristoffer Haugsbakk <code@khaugsbakk.name>
Date
Jul 31, 2023, 10:10 UTC
Message-ID
<a5c359d6-6c21-489c-a4a3-a21219ab727a@app.fastmail.com>
In-Reply-To
<CAP8UFD1M3sRPEJ42v2=pQ_CQYY+PN64Swx70O7D_=VfbhSwKLg@mail.gmail.com>
> The Magic of Empty Git Commit by Pradumna Saraf on DEV.to - a simple
> description on how to create an empty commit, and why one would might
> want one.
The article does a poor job of motivating empty commits in my opinion.
Show 7 quoted lines
> > Although seemingly counterintuitive, [empty commits] offer valuable
> benefits for documentation, triggering automation.
> […]
> Empty commits might seem unusual, but they offer significant advantages
> in managing version control. By documenting milestones, triggering
> automation processes, and maintaining codebase stability, empty commits
> can improve collaboration and project management.

So one use-case that is clear from the above is as a hack for triggering builds or something that require a new commit (in other words: that can’t simply be rerun). The rest—documenting milestones, maintaining codebase stability—is not obvious since you usually do that in a regular commit.

You can see from the comments that other people also don’t understand what the motivation is.

I use empty commits myself because I’ve seen use-cases for it described on this list. For example: storing the cover letter as the first (empty) commit on the branch. Definitely useful for in-progress work.

The article, in contrast, just asserts that it is useful and then provides a one-liner as its technical content.

My opinion from the peanut gallery is that the article isn’t worth the inclusion.

-- 
Kristoffer Haugsbakk
Previous: Christian CouderNext: Christian Couder
Message 2 of 4 in “Draft of Git Rev News edition 101”
  1. Christian CouderJul 29, 2023
  2. Kristoffer HaugsbakkJul 31, 2023
  3. Christian CouderJul 31, 2023
  4. Junio C HamanoJul 31, 2023

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.