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.

The case I am referring to is pushing to the branch for the PR (as
opposed to master/release branches). GitHub does not preserve the
intermediary versions of the source, even if they have been reviewed.
If the comments are commit comments (common flow many people use) then
then comments are lost too.

For the case of non-PR, please ask webmaster to simply protect the
branches in github as they are in git.eclipse.org.


Back to the top