98

I am using the following commands to see all the local commits which are not pushed to remote branch but I am not getting all those local commits.

 git log  
 git log origin/master..master  

I want to see at-least 10 local commits(only local).

mathielo
  • 6,725
  • 7
  • 50
  • 63
tom
  • 3,720
  • 5
  • 26
  • 48

1 Answers1

181

This will show you all not pushed commits from all branches

git log --branches --not --remotes

and this will show you all your local commits of branch main

git log origin/main..main
Roelant
  • 4,508
  • 1
  • 32
  • 62
Aleksander Monk
  • 2,787
  • 2
  • 18
  • 31