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
If you drop this into your Bash profile you'll be able to run grin (Git remote incoming) and grout (Git remote outgoing) to see diffs of commits that are incoming and outgoing for origin master:
function parse_git_branch {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/'
}
function gd2 {
echo branch \($1\) has these commits and \($2\) does not
git log $2..$1 --no-merges --format='%h | Author:%an | Date:%ad | %s' --date=local
}
function grin {
git fetch origin master
gd2 FETCH_HEAD $(parse_git_branch)
}
function grout {
git fetch origin master
gd2 $(parse_git_branch) FETCH_HEAD
}