Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [incubation] Contributions via GitHub, how to handle squash commits



On Wed, Jul 26, 2017 at 12:09 PM, Jonah Graham <jonah@xxxxxxxxxxxxxxxx> wrote:
However, be careful with doing force pushes on GitHub, you can lose
some/all of the review history. That is the main reason I like doing
Squash and Merge.

I have to admit I sometimes make mistake with a Git push force ;)
However, as the local Git repo keeps the reflog for a while, it has always been easy to push back the correct history to a branch. A basic rule to follow would be to never push --force on the "official" repo and to allow yourself that on your fork, that covers well the use-case of Gerrit-ifying the GitHub PR workflow with updates of a single commit rather than a sequence.
--
Mickael Istria
Eclipse IDE developer, at Red Hat Developers community

Back to the top