How can I see which commits are actually going to be pushed to a remote repository?
As far as I know, whenever I pull master from the remote repository, com
I've added the following aliases to my ~/.gitconfig, to show what would be merged (during a pull), what would be pushed, and an alias to diff against the remote:
[alias]
# diff remote branch (e.g., git diff origin/master master)
difr = "diff @{u}"
# similar to hg incoming/outgoing, showing what would be pulled/pushed
# use option "-p" to see actual patch
incoming = "!git remote update -p; git log ..@{u}"
# showing what would be pushed (see also alias difr)
outgoing = log @{u}..