View git changes / differences of local commits not pushed to remote

I have three Git that I committed locally, but didn't click on GitHub. I would like to see the changes / differences for all three commits, how to view all the differences?

I tried: git log --branches --not --remotes

Which shows me three commits, but not all the differences / changes of each one.

 commit c08fbb72ae6a06e8b2ff3dbbb96fb555a43f4136 Author: Justin < justin@mydomain.com > Date: Mon Sep 10 18:17:02 2012 -0700 Updated order of requires in Requires.php commit 041fe19a48269a8aea2ccf90f53568893d4e0158 Author: Justin < justin@mydomain.com > Date: Mon Sep 10 17:56:42 2012 -0700 Checking for app.config.php in Requires.php commit 61c103a8a122bcde2311d081a8340ee1dd71997c Author: Justin < justin@mydomain.com > Date: Mon Sep 10 17:42:20 2012 -0700 Version bump 0.4.0. See CHANGELOG.md 

Thanks for the help.

+4
source share
2 answers

git log -p --branches --not --remotes

They worked.

+6
source

You can probably use git diff as follows:

 git diff origin/master..HEAD 

assuming your HEAD is currently pointing to your last commit. Otherwise, you can simply use

 git diff origin/master..master 

(Of course, change accordingly if your remote is not a source, or if your branch is not leading.)

+5
source

Source: https://habr.com/ru/post/1436263/


All Articles