The purpose of a git commit message is to answer the question “why does this commit exist?” That is the principal question you should be answering when you type `git commit`. This is the question you will be asking yourself when you find that commit in `git blame` or if it shows up in `git bisect`. Try to help your future self out. The changelog, on the other hand, answers the question “why does the customer care abo…
Git log is not a changelog
21–30 of 92 posts
Re: Git log is not a changelog
#22The purpose of a git commit message is to answer the question “why does this commit exist?” That is the principal question you should be answering when you type `git commit`. This is the question you will be asking yourself when you find that commit in `git blame` or if it shows up in `git bisect`. Try to help your future self out. The changelog, on the other hand, answers the question “why does the customer care abo…
A couple jobs ago, I was at a company that had a "mandatory" squash / rebase / merge workflow so history would be clean. On top of that, they forced all their developers to update a change log as part of the merge. That file was a source of contention / merge conflict for nearly every PR, often requiring additional rounds of rebasing. On top of that, it was full of information that could've been gathered from the git…
It felt kind of silly and I don't know if anyone actually looked at the changelogs, but it took 2 minutes out of my day and worked well.
Re: Git log is not a changelog
#23I use the git log to feed my changelog. I prefix the stuff that's supposed to go in the release notes with a asterix and the technical boring stuff is just a normal line. Then at release time I have a script that pulls the asterix prefixed lines from the change log into the RELEASENOTES.md. I wouldn't want to bother with more.
Re: Git log is not a changelog
#24 git commit -m "feat: script pretty print" -m "added variables for bold, normal, and a nice blue arrow"
becomes: feat: script pretty print
added variables for bold, normal, and a nice blue arrow
In your git log output. Use extra "-m" sections for stuff like ticket references, or other relevant information like a link to a design document.Re: Git log is not a changelog
#25I think commits should contain atomic-yet-meaningful changes and the commit message should describe this as well as possible. It's worth rewriting the history to achieve this and squashing or splitting commits until this is the case. You shouldn't do this for the benefit of your users or a changelog, you should do this in order that it is easier to bisect the history or for other contributors to understand exactly th…
Re: Git log is not a changelog
#26Re: Git log is not a changelog
#27plus maybe a 'fixes' list (because a spec file doesn't need to say 'what used to not work')
then compute diffs of these using git history to produce a changelog
Re: Git log is not a changelog
#28Earlier quoted context omitted.
How do you know that your asterixed commit should go into the release notes? What if... * fixed thing X so that user can do Y broke things so that another commit is needed: * fixed X again, so that user can finally do Y (for realz this time) This would not make a great release note.
you just wouldn't put a * in front of the second one
Re: Git log is not a changelog
#29The purpose of a git commit message is to answer the question “why does this commit exist?” That is the principal question you should be answering when you type `git commit`. This is the question you will be asking yourself when you find that commit in `git blame` or if it shows up in `git bisect`. Try to help your future self out. The changelog, on the other hand, answers the question “why does the customer care abo…
Why? Every time I have asked this people say because you'll search the logs (which I have never done in my life) or because "it's good practice"
Re: Git log is not a changelog
#30Use multiple "-m" parameters in your git commit. git commit -m "feat: script pretty print" -m "added variables for bold, normal, and a nice blue arrow" becomes: feat: script pretty print added variables for bold, normal, and a nice blue arrow In your git log output. Use extra "-m" sections for stuff like ticket references, or other relevant information like a link to a design document.