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
I believe the most typical way of doing this is to run something like:
git cherry --abbrev=7 -v @{upstream}
However, I personally prefer running:
git log --graph --decorate --pretty=oneline --abbrev-commit --all @{upstream}^..
which shows the commits from all branches which are not merged upstream, plus the last commit in upstream (which shows up as a root node for all the other commits). I use it so often that I have created alias noup for it.
git config --global alias.noup \
'log --graph --decorate --pretty=oneline --abbrev-commit --all @{upstream}^..'