开发者

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:

  1. To list the commits only (without the diff) - git log @{u}..
  2. 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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜