0

I'm working in a branch that is remote tracking. I've made several commits.

Is there any way to get a list of the commits I've made that I have NOT pushed yet? Is there any way to get a list of the commits that I haven't pulled yet?

KingCrunch
  • 124,572
  • 19
  • 146
  • 171
CasaDelGato
  • 445
  • 5
  • 15
  • 1
    http://stackoverflow.com/questions/2016901/viewing-unpushed-git-commits - maybe this can help you. It's about not pushed. – Andriy Khrystyanovich Feb 19 '13 at 23:33
  • Yup, seems to have been a duplicate, I was just unable to find the referenced question previously. I ended up using the "git log ..@{u}" (and converse) syntax. – CasaDelGato Feb 24 '13 at 23:39

2 Answers2

2

You can see a list of commits you have not yet pushed by running

git log origin/master..master

optionally swapping in some other branch name for origin/master and master (e.g., origin/mybranch and mybranch).

Benjamin Pollack
  • 26,542
  • 16
  • 78
  • 103
0

Something along the lines of

git diff master origin/master

might work. But that will give you way more info than just the commit list, so you probably need to use different options.

Edit: But you probably need to run

git fetch

first

Josh Buell
  • 606
  • 5
  • 12