coderrr

April 17, 2009

How to get a list of un-pushed commits in git

Filed under: git — Tags: — coderrr @ 10:16 pm

Assuming your remote repository is named origin and you’re dealing with the master branch:

$ git log master ^origin/master

This shows what commits are in master but not in origin/master (which is the remote branch).

This same syntax can be used to see the difference between two local branches, but will show cherry-picked commits as differences which can be confusing:

$ git log master ^production

No Comments Yet »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a comment

Blog at WordPress.com.