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


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 "pull request" feature. When I issue a pull request, I can look and see what will be pulled in if they accept my pull request: github example of aggregate changes

Command line is OK, but I'd prefer some sort of GUI (like the screenshot above).


For a list of files to be pushed, run:

git diff --stat --cached [remote/branch]


git diff --stat --cached origin/master

For the code diff of the files to be pushed, run:

git diff [remote repo/branch]

To see full file paths of the files that will change, run:

git diff --numstat [remote repo/branch]

If you want to see these diffs in a GUI, you will need to configure git for that. See How do I view 'git diff' output with a visual diff program?.

How can I see the changes in a Git commit?

Why is Git better than Subversion?