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).
We can view the unpushed git commits using the git command. It will display all the commits that are made locally but not pushed to the remote git repository.
On GitHub.com, you can access your project history by selecting the commit button from the code tab on your project. Locally, you can use git log . The git log command enables you to display a list of all of the commits on your current branch. By default, the git log command presents a lot of information all at once.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With