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

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

    To see which files are changed and view the actual code changes compared to the master branch you could use:

    git diff --stat --patch origin master
    

    NOTE: If you happen to use any of the Intellij IDEs then you can right-click your top-level project, select Git > Compare with branch > and pick the origin you want e.g. origin/master. In the file tree that will appear you can double-click the files to see a visual diff. Unlike the command-line option above you can edit your local versions from the diff window.

提交回复
热议问题