Review code changes, then discard
Sometimes I want to review a PR by looking at the changes in my editor locally. Once I'm happy, I throw away the changes.
The command sequence to do this is:
git checkout main
git merge --squash branch-name-here
# <do productive and important review work here>
git reset --hard HEAD
And if I forget the --squash, it's git reset HEAD~ to toss it away and try again.