+2 votes
1 view
in Devops and Agile by (20k points)
edited by

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?

2 Answers

+1 vote
by (28.4k points)
edited by

Say, you performed a commit but did not push it to any branch. Use this to see what that commit was:

git reflog

For more information please go through the following tutorial to get more info about git:

 

+2 votes
by (63.4k points)

You can try this:

git log origin/master..HEAD

You can also view the diff using the same syntax

git diff origin/master..HEAD

Related questions

Welcome to Intellipaat Community. Get your technical queries answered by top developers !


Categories

...