Before I merge or push, I like to see which commits are actually new. A two-dot range in git log gives that list.
git log --oneline main..feature
Read main..feature as “reachable from feature, but not from main”. Commits that are already on main don’t show up, so you get only what a merge would add. Turn it around and you see what main got since you branched:
git log --oneline feature..main
It works with remote branches too. After a git fetch, git log HEAD..origin/main shows what you’d get from a pull, and git log origin/main..HEAD shows what you haven’t pushed yet. Leave out one side and git fills in HEAD, so git log origin/main.. means the same as the last one.
The list compares commits, not content. If someone cherry-picked one of your commits onto main, it has a different hash there, and the range still lists your copy. git cherry is the tool that spots those. Also remember to fetch first: the range only knows about origin/main as it was at your last fetch.
Further reading: gitrevisions documentation, git-log documentation