How can I view any local commits I've made, that haven't yet been pushed to the remote repository? Occasionally, git status
will print out that my branch is X commits ahead of origin/master
, but not always.
Is this a bug with my install of Git, or am I missing something?
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 is not possible by definition. A commit that someone else hasn't pushed is local to their machine. The only way to see unpushed commits would be to log into whatever machine they are working on, and cd into their working directory if they're willing to let you do that.
git log origin/master..HEAD
You can also view the diff using the same syntax
git diff origin/master..HEAD
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