Re:How to Write a Git Commit Message (2014)
by greenhouse_gas on Thursday March 16, 2017 @06:16PM
(#13889696)
Would be interesting if there was a way to annotate a set of commits, like "commit ???? - ????: refactored A,B, and C" so you'd get the advantage of small commits and clearer messages.
[ Parent
| on HN ]
Re:How to Write a Git Commit Message (2014)
by ibgib on Thursday March 16, 2017 @09:12PM
(#13890558)
This is what PRs are good for. Also, with my particular approach to commits, I always have at least one issue associated to a commit, and I'm always working on a particular branch associated to the issue. I pick an emoji that captures the issue/branch in a single concept, and I have that in my subject line. This is combined with my git commit template mechanism, and I like it. At a glance, I can see which commits belong together, and if I want to look at the whole, I go to the PR.
Re:How to Write a Git Commit Message (2014)
by data_hope on Tuesday March 21, 2017 @09:43AM
(#13922085)
neat
Re:How to Write a Git Commit Message (2014)
by data_hope on Thursday March 16, 2017 @06:20PM
(#13889714)
I think you can do that in a merge commit, sort of.
The more I think about it, the stranger a strong aversion to rewriting commit history for clarity is. In university if I did some math / physics calculation, I would often start, and once I got somewhere, make a clean copy of the successful work to have a concise and revised version.
Re:How to Write a Git Commit Message (2014)
by perfmode on Thursday March 16, 2017 @06:54PM
(#13889901)
I am a firm believer that it's totally fine to rewrite history when working on a private branch that hasn't been pushed.
Re:How to Write a Git Commit Message (2014)
by jononor on Thursday March 16, 2017 @08:00PM
(#13890247)
Mostly fine to do it on a feature/PR branch also, in my opinion.
If those become long-lived with multiple people touching them (where history rewrites become peoblematic) you are not integrating continuously enough.