Zulip Chat Archive

Stream: general

Topic: squashing PRs


view this post on Zulip Yury G. Kudryashov (Oct 23 2019 at 22:29):

Hi, what is the reason for squashing PRs? What's wrong with just merging branches? Then git log --merges will show what git log shows now.

view this post on Zulip Reid Barton (Oct 23 2019 at 22:33):

Many commits would not build then. Would git bisect handle this properly? Or Travis?
More generally, I find git repositories with merges kind of difficult to deal with, maybe because I'm not used to them...

view this post on Zulip Yury G. Kudryashov (Oct 23 2019 at 22:38):

Does Travis care about commits other than HEADs of the master and PRs?

view this post on Zulip Yury G. Kudryashov (Oct 23 2019 at 22:38):

Didn't try git bisect yet.

view this post on Zulip Reid Barton (Oct 23 2019 at 22:38):

For example, although I'm not sure this exact situation would arise in practice, I don't think git rebase works properly when you try to rebase a merge commit. At least it did not work ~10 years ago.

view this post on Zulip Yury G. Kudryashov (Oct 23 2019 at 22:39):

You shouldn't rebase master anyway.

view this post on Zulip Reid Barton (Oct 23 2019 at 22:40):

What would git log -p --merges show?

view this post on Zulip Reid Barton (Oct 23 2019 at 22:41):

oh, maybe git log --first-parent is better?

view this post on Zulip Reid Barton (Oct 23 2019 at 22:42):

Maybe a better answer is that currently most contributors don't attempt to create anything like a clean history on their PR branches, so the extra information that would be retained by merging is sort of garbage.

view this post on Zulip Yury G. Kudryashov (Oct 23 2019 at 22:43):

Yes, this is a good reason.

view this post on Zulip Reid Barton (Oct 23 2019 at 22:45):

Another side effect of this is the terrible commit messages

* oops
* fix
* fix again

Last updated: May 16 2021 at 21:11 UTC