For a list of files to be pushed, run:

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

example:

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?.

Answer from Ionuț G. Stan on Stack Overflow
🌐
Reddit
reddit.com › r/git › can i see all of my changes before i push them and open a pr?
r/git on Reddit: Can I see all of my changes before I push them and open a PR?
June 11, 2021 -

I'm pretty new to git and I got the basic workflow down. Now I'm trying to improve my skills a bit with git.

Is there some easy way for me to review all of my changes before I push to a remote branch and open a PR?

It would be nice to make sure I didn't forget to remove any unnecessary comments and code. The main thing I could do is simply open the PR and check on Github "files changed" and review it there and do another commit and push if I need to clean things up.

But I'm not sure if there's a way to do this before the PR is even opened. I'm using Android Studio btw so if there's a way in Android Studio (which is basically IntelliJ) then that would be good.

Discussions

git - How to see changes to a file before commit? - Stack Overflow
So back to my question, there must ... state, before you actually commit. Maybe there is a different command for that. ... to see the diff only for a file. You can also see the diff in a given sub-directory of your project: ... You can also specify a path with --staged. ... Sign up to request clarification or add additional context in comments. ... Make sure you've staged some changes. Otherwise, git commit -v ... More on stackoverflow.com
🌐 stackoverflow.com
How can I see what has changed in a file before committing to git? - Stack Overflow
With the * you're letting the shell ... miss changes in hidden files. 2015-05-20T17:14:05.623Z+00:00 ... # show differences between current commit and index # that is, what you're about to commit git diff --cached [filename] Don't you mean: # show differences between current commit and index # that is, what you're about to push? git diff --cached [filename] 2017-04-07T12:46:15.967Z+00:00 ... To see differences ... More on stackoverflow.com
🌐 stackoverflow.com
git - How to view the committed files you have not pushed yet? - Stack Overflow
Where origin is the remote repository ... you will push. Also, do a git fetch before the diff so that you are not diffing against a stale origin/master. P.S. I am also new to git, so in case the above is wrong, please rectify. ... I would like to point out that your syntax will show "+" for what was in the remote and "-" for what is in the local. That seems backward to me (a matter of taste)--I want a "+" to show what I've committed locally and ... More on stackoverflow.com
🌐 stackoverflow.com
How to tell the results of git commit before git push? - Stack Overflow
Once you've run git commit the changes are already checked in to your local repository. Pushing does not check them in, it just updates another repository with the commits you have in your local repository. This is different from a centralised VCS like Subversion. Before you push there are several ways of seeing ... More on stackoverflow.com
🌐 stackoverflow.com
People also ask

What is git commit?
It is a git command that saves our changes (added or modified files) to the local repository, making it a permanent part of our project’s history
🌐
intellipaat.com
intellipaat.com › home › blog › how can i see what i am about to push with git
How can I see what I am about to push with Git - Intellipaat
How to git push command?
To push our local changes (commits) to the remote repository, we use the git push command: git push origin
🌐
intellipaat.com
intellipaat.com › home › blog › how can i see what i am about to push with git
How can I see what I am about to push with Git - Intellipaat
How do I check which repo I am in git?
To check which repository we’re currently in, we can use the command: git remote -v
🌐
intellipaat.com
intellipaat.com › home › blog › how can i see what i am about to push with git
How can I see what I am about to push with Git - Intellipaat
🌐
Drupal
drupal.org › forum › support › module-development-and-code-questions › 2011-06-01 › how-to-see-changes-in-git-commits
How to see changes in git commits, before pushing them | Drupal.org
June 1, 2011 - You changed it again and committed. if you do a diff, you see the difference between what was in the origin repo, and what your version is now - effectively one line changed. What happened, because git tracks local commits as events, and will forward each event up into the commit log - is there were two commits that happened.
🌐
Tom de Bruijn
tomdebruijn.com › posts › git-review-changes-before-committing
Git: Review changes before committing | Tom de Bruijn
October 26, 2020 - Git commits can be made very quickly, but we don't see what changes are committed. We can improve the way we make commits by reviewing what we commit first.
🌐
GeeksforGeeks
geeksforgeeks.org › git › how-to-see-the-changes-in-a-git-commit
Inspecting Changes in a Git Commit - GeeksforGeeks
January 19, 2026 - Run git show <commit-hash> to view the details of a specific commit. ... After committing changes, run git log to list commits and select a specific one to review its changes.
🌐
Linux Hint
linuxhint.com › see-changes-to-a-file-before-commit
How to See Changes to a File Before Commit? – Linux Hint
Then, generate and add a new file into the staging area. Next, update the repository by committing. After that, open the existing file and add some text. Push newly added changes to the staging index and check the repository’s current status. Lastly, execute the “git diff –cached” command.
Top answer
1 of 2
76

To see all the diff in tracked files but not staged:

git diff

or

git diff path/to/a/given/file

to see the diff only for a file. You can also see the diff in a given sub-directory of your project:

git diff path/to/a/dir/

If you have already staged the changes with git add, you can see what patch you have staged with

git diff --staged

You can also specify a path with --staged.

2 of 2
35

Make sure you've staged some changes. Otherwise, git commit -v will show you a block similar to what you posted, but not do anything. You can stage changes manually with git add, or if the files are already versioned, you can use git commit -a -v to stage and commit the changes.

For example:

$ echo "more foo" >> foo.txt
$ git commit -v
# On branch master
# Changes not staged for commit:
#   (use "git add <file>..." to update what will be committed)
#   (use "git checkout -- <file>..." to discard changes in working directory)
#
#   modified:   foo.txt
#
no changes added to commit (use "git add" and/or "git commit -a")

Staging the change shows the diff with git commit -v:

:: git add foo.txt
:: GIT_EDITOR=cat git commit -v

# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
# On branch master
# Changes to be committed:
#   (use "git reset HEAD <file>..." to unstage)
#
#   modified:   foo.txt
#
diff --git a/foo.txt b/foo.txt
index 257cc56..a521556 100644
--- a/foo.txt
+++ b/foo.txt
@@ -1 +1,2 @@
 foo
+more foo
Aborting commit due to empty commit message.

If you just want to see the diff without committing, use git diff to see unstaged changes, git diff --cached to see changes staged for commit, or git diff HEAD to see both staged and unstaged changes in your working tree.

UPDATE: given your edit, what you really want are the git diff derivatives above. I'm not sure how Aptana Studio works. It may not follow the typical command line git flow. On the command line, you'd stage your changes, and then commit. And the above git diff commands are what you'd use to examine those changes. I typically alias them as git unstaged, git staged, and git both by adding this to my ~/.gitconfig:

[alias]
    # show difference between working tree and the index
    unstaged = diff

    # show difference between the HEAD and the index
    staged = diff --cached

    # show staged and unstaged changes (what would be committed with "git commit -a")
    both = diff HEAD
Find elsewhere
🌐
Medium
pavolkutaj.medium.com › how-to-list-files-that-will-be-pushed-in-git-34995984346d
How To List Files That Will Be Pushed In Git | by Pavol Z. Kutaj | Medium
October 12, 2021 - The aim of this page📝is to find files that are a) committed b) not pushed yet c) will be pushed with git push command · It is simplified for checking just branches that are set as matching already (e.g. master <> origin/master) ... … view the changes you staged for the next commit relative to the named <commit> …
🌐
LabEx
labex.io › questions › how-to-view-changes-before-committing-387457
How to View Changes Before Committing in Git | LabEx
September 19, 2024 - Now, you can use git status to ... directory) modified: index.html no changes added to commit (use "git add" and/or "git commit -a")...
🌐
Git
git-scm.com › book › en › v2 › Git-Basics-Viewing-the-Commit-History
Git - Viewing the Commit History
For example, if you want to see which commits modifying test files in the Git source code history were committed by Junio Hamano in the month of October 2008 and are not merge commits, you can run something like this: $ git log --pretty="%h - %s" --author='Junio C Hamano' --since="2008-10-01" ...
🌐
Educative
educative.io › answers › how-to-view-unpushed-git-commits
How to view unpushed Git commits
In this shot, we'll learn how to view git commits that have not been pushed to the remote repository.
🌐
DeployHQ
deployhq.com › learn git › viewing the commit history
How to View Git Commit History with git log and git show - DeployHQ
March 6, 2026 - Use git log to view commit history, filter by author or date, and format output with --oneline and --graph. Plus git show for inspecting individual...
🌐
egghead.io
egghead.io › lessons › git-add-more-files-and-changes-to-a-commit-before-pushing
Add More Files and Changes to a Commit Before Pushing | egghead.io
November 27, 2019 - Caution: only do this BEFORE you've pushed the commits - otherwise you will be re-writing history for people who may have already pulled down the old commits. ... Instructor: [0:00] I have a project with one HTML file and if I do git log oneline ...
🌐
Intellipaat
intellipaat.com › home › blog › how can i see what i am about to push with git
How can I see what I am about to push with Git - Intellipaat
February 3, 2026 - This will let us know what changes have been made, such as added, deleted, modified files, etc. ... Ensure you’re on the correct branch before pushing by using git branch. ... The next step is to review the commit history of the repository.
🌐
Graphite
graphite.com › guides › git-view-changes
How to view changes in Git - Graphite
This guide will explore the different methods to view changes in Git, using commands like `git diff`, `git status`, and others.