Hacker News new | ask | show | jobs
by js2 3751 days ago
That button only appears when you add new commits to the existing branch/PR. If you amend any commits and force push, the rewritten commits are lost forever on the GitHub side of things. You can only find them in your local ref-log at that point.

Gerrit instead retains each rewrite of the "same" commit. It does this by requiring you to insert a "Change-Id: ..." footer into each commit message (it provides a repo hook to do this) and examines each incoming commit message to know whether that commit is a revision to a commit it's already seen.

1 comments

Only comments on the commits are lost. Comments on the Files tab of the PR itself are kept and you can "View outdated diff".

In our project we exclusively use comments on the Files tab precisely for that reason.

Well, I guess this explains why sometimes I saw comments on PRs disappear and sometimes they didn't, thanks.

The difference between commenting on the commit page and on the "files tab" is pretty subtle though...