How do I know the list of commits / changes before I push

git

Solution

`git diff` doesn't, by default, show you anything from previous commits. You should use `git log` for that. To show the last two commits, use `git log -2`.

To compare commits with each other using diff, the syntax is `git diff commit1 commit2`. For example, to show you all the changes that occurred between two commits ago and now, type `git diff HEAD^2 HEAD`.

Problem

git status shows that I have 2 commits ``` # On branch production # Your branch is ahead of 'origin/production' by 2 commits. # ``` but git diff shows nothing

Original source

Related problems