How can I see what I am about to push with git?

前端 未结 14 2037
北恋
北恋 2020-11-27 09:06

Is there a way to see what would be pushed if I did a git push command?

What I\'m picturing is something like the \"Files Changed\" tab of Github\'s \"p

14条回答
  •  北海茫月
    2020-11-27 09:12

    You can list the commits by:

    git cherry -v
    

    And then compare with the following command where the number of ^ equals to the number of commits (in the example its 2 commits):

    git diff HEAD^^
    

提交回复
热议问题