gromero commented on pull request #7333: URL: https://github.com/apache/tvm/pull/7333#issuecomment-777008938
> @gromero easiest way to patch given merges might be something like: > > ``` > $ git fetch origin main > $ git fetch areusch <pr> > $ git diff areusch/<pr>...origin/main >patch # NOTE 3 periods > $ git checkout $(merge-base areusch/<pr> origin/main) > $ git apply <patch > ``` @areusch I see. I imagine that's the flow the committer will follow when squashing for the final commit to get merged into `main`? Because if one does a `git rebase -i` straight to the branch related to the PR with the incremental changes "intertwined" with the commits brought by the merges it would kind of a nightmare to squash afaics? Now, I've just made a quick test and I see that the review comments (even the comments related to a line of code) *haven't disappeared* after a `git push -f`, so it does really keep the review history. What I did on the experiment for a PR under review was simply the following, whilst checked out in the PR branch (`pr`) and with an incremental change already committed to the branch: ``` git pull --rebase origin main git push -f origin pr ``` The forced push and the new incremental change (plus the changes merged / pushed into `main` meanwhile) were all correctly displayed below the review comments posted previously to it. Feel free to ping for a few tests if you want :) > I generally try to push -f until there's a comment on the thread Yeah, that's what I do too. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected]
