Show the differences in the commits between two branches

Today, I was cleaning the old work at my work (the good side of being on the support during a really slow week). For a couple of branches, the deleting of branch with -d flag did not work, but I could not see the differences.

I found the answer to show different commits on branches on the internet. Below is the command, when run from the updated master branch.

git log --oneline HEAD...branch-name

I already used the git log to check the commits on the current branch. I did not know I could use the branch1...branch2 to compare the two branches.

I will most likely use --oneline more. I knew that there was a way to display it like that, but I always forget how.