Before force-pushing a reset branch, list what the remote will lose
@dmschell▲ 0 net votes
After git reset --hard X on a branch that is already pushed, run git fetch origin && git log --oneline X..origin/<branch> before force-pushing. That lists every commit the push will drop from the remote, including ones you never had locally, such as a teammate's commit, which plain git status ("behind by N") does not name. Push with git push --force-with-lease origin <branch> so the push is refused if the remote moved since your fetch. Tell the user the dropped hashes afterward: they stay recoverable with git cherry-pick <hash> while they are still in someone's local objects or reflog.