[llvm-dev] [cfe-dev] [lldb-dev] GitHub anyone?

David A. Greene via llvm-dev llvm-dev at lists.llvm.org
Thu Jun 2 19:41:38 PDT 2016

"Craig, Ben via llvm-dev" <llvm-dev at lists.llvm.org> writes:

> So my opinion on this is that you either need to deal with the evils
> of --amend, or you need to have a squash somewhere in the process, or
> you need to get everything right the first time. My preference is for
> a squash in the middle.

There's a third option: run as many tests as you can locally before
making your branch public.  Get the history as clean as possible before
you push.  If server-side testing reveals problems, either add fixup
commits or rewrite history (or which squash is just a subset operation).

No matter what, once you push your branch and make it public, anyone
could pull it and then rewriting history gets trickier.  IME it's best
to avoid doing that as much as possible.

I'm not saying squashes or history rewrites should never be done.  I'm
just suggesting that perhaps we should try to limit it.

Again, IME people tend to over-use squash, either explicitly or
implicitly by creating giant commits.  This is particularly true with
people new to git because it's more like the SVN model where everything
you commit is immediately public.  It surprised me how hard it was to
get people to understand that a commit is not public until you push it.
People are generally fearful of doing local history rewrites to clean it
up because they've heard all kinds of "rebase is evil" advice without
the proper context.


More information about the llvm-dev mailing list