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

前端 未结 14 2064
北恋
北恋 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:33

    After git commit -m "{your commit message}", you will get a commit hash before the push. So you can see what you are about to push with git by running the following command:

    git diff origin/{your_branch_name} commit hash
    

    e.g: git diff origin/master c0e06d2

提交回复
热议问题