[git] List Git commits not pushed to the origin yet

Possible Duplicate:
Viewing Unpushed Git Commits

How do I list all commits which have not been pushed to the origin yet?

Alternatively, how to determine if a commit with particular hash have been pushed to the origin already?

This question is related to git

The answer is


how to determine if a commit with particular hash have been pushed to the origin already?

# list remote branches that contain $commit
git branch -r --contains $commit