How to tell whether I have anything to push?

Viewed 58

To find out whether I have anything to pull I do this:

git fetch --dry-run --verbose

How can I remind myself whether I have anything to push?

1 Answers

To see uncommitted changes:

git status

To see uncommitted changes and not pushed commits (works if you have already configured upstream branch):

git status --branch

To list the not pushed commits:

git log @{upstream}..

To see the not pushed code:

git diff @{u}..

Split by commit:

git log -p @{u}..

And of course

git push --dry-run
Related