How to list unpushed Git commits (local but not on origin)

This gives a log of all commits between origin/master and HEAD:

git log origin/master..HEAD

When HEAD is on the master branch, this gives a log of unpushed commits.


Similarly, to view the diff:

git diff origin/master..HEAD

Leave a Comment

tech