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