4 ms·
git commit's -v or --verbose flag allows you to see a diff of your currently staged changes so that sounds somewhat similar to your command. I find that seeing
by olivierlacan 10y ago
git commit's -v or --verbose flag allows you to see a diff of your currently staged changes so that sounds somewhat similar to your command.
I find that seeing the exact changes you're about to commit does lead to more detailed git commit messages, although the maximum length of most "properly" written commit message titles (50 characters) tends to hinder the quality of commit message titles as entries in a changelog. They're often very high level summaries of introduced changes and it's common for people to focus on the change at hand — not on its impact on end-users — when writing a commit.
Again, this all goes back to the intended audience for commit messages compared to change logs. If the end users of the projects you work on diligently read every commit in the project history, then I dare suggest you're in a rare and privileged situation. I don't expect end-users of most open source software to be satisfied with either the high-level nature of commit titles, or their minutia. This leads me to think that keepachangelog.com needs to gather more examples of the of changelogs I advocate for. It seems that a surprisingly small number of people have encountered them.
Rebasing and squashing commits to clean them up to be changelog-worthy does not solve the 50-character issue with conventional commit titles I mentioned above. It also doesn't solve for situations with collaborative pull requests or branches. That is, unless there's a clear process for squashing and rebasing being done by a single person at the very end of the project. I think it's more realistic to expect a single file changelog to be regularly updated (through an Unrealeased section) as changesets are being introduced prior to a release and to eventually update this same single file when the group of changesets is about to be released under a new dated version release.
- kazinator 10y agoAw man, I've been fetching the output of "git diff --cached" into the buffer when committing, to see the darned diff.
- jacques_chester 10y ago> I don't expect end-users of most open source software to be satisfied with either the high-level nature of commit titles, or their minutia. In my experience, they aren't. They want a top-level view of why/if they should upgrade. In my dayjob, when preparing a release, we use tools to dump the git commit messages into the head of the CHANGELOG, then edit it back into user-facing text. We omit changes that are not user-facing (eg. 'gem you've never heard of upgraded to 0.4.4') and focus on changes they care about (eg. 'Redact credentials from URLs in a cached buildpack's output'). See for example our Ruby buildpack CHANGELOG[0]. We build our own binaries for buildpacks. So in addition, for our Github releases, we take the CHANGELOG entry and append a table of supported binaries and default versions[1]. These show up in the CHANGELOG only if we add or drop a core binary. We work out of Tracker, so we link to Tracker stories, bugs and chores for every mentioned in the CHANGELOG or release notes. [0] https://github.com/cloudfoundry/ruby-buildpack/blob/master/CHANGELOG https://github.com/cloudfoundry/ruby-buildpack/blob/master/C... [1] https://github.com/cloudfoundry/ruby-buildpack/releases/tag/v1.6.22 https://github.com/cloudfoundry/ruby-buildpack/releases/tag/...