How do I see my local unpushed commits?

user565660 picture user565660 · May 1, 2013 · Viewed 61.1k times · Source

If I have a local branch test and the remote branch is test. So if I did a push it would be push origin test:test

How can I see my local unpushed commits that I did on that branch? git log?

Answer

François picture François · May 1, 2013

I generally use gitk --all for that (after a git fetch --all).

And, for console mode, I have an alias of git log --graph --all --decorate --oneline which gives a nice and compact overview of your branches. In particular, it shows what you can push.

For both these commands you can specify branches (test origin/test in your case) instead of showing them all with --all.