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?
This worked for me:
As indicated at Git: See all unpushed commits or commits that are not in another branch.
one way of doing things is to list commits that are available on one branch but not another.
This worked better for me:
or:
If you want to see all commits on all branches that aren't pushed yet, you might be looking for something like this:
And if you only want to see the most recent commit on each branch, and the branch names, this:
I use the following alias to get just the list of files (and the status) that have been committed but haven't been pushed (for the current branch)
then just do:
You could try....
I know it is not a pure command line option but if you have it installed and are on a GUI system it's a great way to see exactly what you are looking for plus a whole lot more.
(I'm actually kind of surprised no one mentioned it so far.)