开发者

How to show all committed-but-not-pushed-yet content in Git?

开发者 https://www.devze.com 2023-03-27 19:34 出处:网络
Time passes, and commits accumulate on my branch. How can I review the changes that piled up in my branch, before pushing开发者_运维技巧 them?

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

精彩评论

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