How to show all committed-but-not-pushed-yet content in Git?
Time passes, and commits accumulate on my branch. How can I review the changes that piled up in my branch, before pushing开发者_运维技巧 them?
Thanks.
I guess you want to diff the two branches local and remote with the same name.
git diff <localbranch> <remote tracking branch>
for example:
git diff master origin/master
Assuming you are on the branch on which you have been committing:
- To list the commits only (without the diff) -
git log @{u}..
- To list the commits with the diff -
git log -p @{u}..
Yes, the commands end with two dots. I am not missing anything. :)
For people coming from mercurial, this is roughly equal to hg outgoing
精彩评论