[Hawkular-dev] [process] tickets and PRs

John Mazzitelli mazz at redhat.com
Wed May 27 07:23:25 EDT 2015


Yes, this is a good idea. My point is if you do a squash from a branch to master, you have to remember to not push any more commits from that branch to master unless you remember to merge back master into that branch first. We screwed up the remote repository very badly one time when we were squashing multiple times from the same branch without merging master back into that branch each time.

Now my rule of thumb is, when I squash, I delete the branch that squash came from so I don't make that same mistake. Either that, or you have to remember to merge master back into that branch (I think that's how to fix it). But I worry I'll still screw up. To me, a squash means "I'm done with this branch" - so once the squash is done, I delete that branch.

----- Original Message -----
> Let me explain myself better.
> 
> Or in which situations I think squash is good:
> 
> - I need to fix a HW-5555.
> - I checkout master and I create a new branch for HW-5555.
> - I start to work there:
> - My commits:
>   - Start working.
>   - Adding a couple of things.
>   - Javadoc typo.
>   - License agains...
> 
> - I think this all 4 commits can be squashed without putting in danger
> anything.
> 
> - We can send the PR to review without squash, and after that, squash to have
> a cleaner structure.
> 
> Again, this can help IMHO.
> 
> ----- Original Message -----
> > From: "John Mazzitelli" <mazz at redhat.com>
> > To: "Discussions around Hawkular development"
> > <hawkular-dev at lists.jboss.org>
> > Sent: Wednesday, May 27, 2015 1:05:44 PM
> > Subject: Re: [Hawkular-dev] [process] tickets and PRs
> > 
> > Uh...I recommend NO squash commits unless you are absolutely sure you know
> > what you are doing :)
> > 
> > I can remember we screwed ourselves badly in the beginning of RHQ when we
> > used squashed commits wrong - the repository got all messed up.
> > 
> > The only time I do a squash commit is if I immediately destroy the branch
> > it
> > came from after the squash commit is performed, that way I know I won't
> > screw anything up.
> > 
> > ----- Original Message -----
> > > I also propose to squash commits when it has sense.
> > > 
> > > Project is growing and for debugging which "commit did that" grouping
> > > commits
> > > into a feature/fix/patch can help.
> > > 
> > > Obviosly there are situations that are not possible, but it can be good
> > > to
> > > start thinking on that.
> > > 
> > > Just my 2 cents.
> > > I can remember we screwed ourselves badly in the beginning of RHQ when we
> > > used squashed commits wrong - the repository got all messed up.
> 
> > > ----- Original Message -----
> > > > From: "Thomas Segismont" <tsegismo at redhat.com>
> > > > To: hawkular-dev at lists.jboss.org
> > > > Sent: Wednesday, May 27, 2015 12:12:38 PM
> > > > Subject: Re: [Hawkular-dev] [process] tickets and PRs
> > > > 
> > > > Le 27/05/2015 12:06, Thomas Segismont a écrit :
> > > > > as many of
> > > > > the commits to the branch have been sent as PR already.
> > > > 
> > > > Well, we should have sent all commits as part of PR and related to a
> > > > ticket. That would have made the review process much easier than
> > > > reviewing PR 228
> > > > _______________________________________________
> > > > hawkular-dev mailing list
> > > > hawkular-dev at lists.jboss.org
> > > > https://lists.jboss.org/mailman/listinfo/hawkular-dev
> > > > 
> > > 
> > > _______________________________________________
> > > hawkular-dev mailing list
> > > hawkular-dev at lists.jboss.org
> > > https://lists.jboss.org/mailman/listinfo/hawkular-dev
> > > 
> > 
> > _______________________________________________
> > hawkular-dev mailing list
> > hawkular-dev at lists.jboss.org
> > https://lists.jboss.org/mailman/listinfo/hawkular-dev
> > 
> 



More information about the hawkular-dev mailing list