I’m not sure I believe in eyeball grouping. Trying to mentally merge 2
(or more) overlapping commits of non-trivial size is not an easy thing
to do (at least for me :) ).
That being said, it’s still a good idea to have the JIRA tickets in
the commit message (and we might want to enforce that) and I also think
that there are JIRAs that con be addressed by a number of self-contained
and more or less independent commits. And if that’s possible I
actually think that that’s the better way. But I’d prefer not to
have overlapping or strongly dependent changes in different commits in
master.
My 2c,
Till
On 24 Sep 2015, at 0:42, Jianfeng Jia wrote:
To ensure 2, IMO it’s better to enforce that every commit start with
a jira ticket number. Then at least we can run an eyeball groupby on
the commit history.
On Sep 23, 2015, at 11:54 PM, Chris Hillery <[email protected]>
wrote:
On Wed, Sep 23, 2015 at 6:29 PM, Ted Dunning <[email protected]
<mailto:[email protected]>> wrote:
Cherry picking (in my experience) works very much as desired. The
fact that a commit exists on two branches doesn't seem to cause any
trouble at all at merge time.
That's good to hear. I have definitely had bad experiences when
dealing with cherry-picked commits, but I have not been able to pin
down a specific case where they don't do what you might hope. I'm not
sure how the git magic works, but it would certainly be compelling if
it did work.
Rebasing interactively is another case. I routinely use this to make
my local history more sensible. Within reason, it allows me to squash
and re-order my own commits so that there appears to be more order in
the historical record than was in my head at the time I did the work.
Yes, this is a good strategy that we would definitely want to
encourage if we were to stop doing the full-squash at commit time.
The golden rules IMHO are:
1. Don't rewrite history (which includes squashing or amending
commits and force pushes) on a branch that has been shared to anyone
else.
2. Ensure that the commits which are ultimately pushed to master are
sensible, self-contained, well-documented, etc.
There's a small amount of tension between those two rules, but it can
be handled.
Ceej
aka Chris Hillery
Best,
Jianfeng Jia
PhD Candidate of Computer Science
University of California, Irvine