What I'm trying to accomplish is similar to what's in this question/answer: Viewing Unpushed Git Commits. I want to find out if there's anything in my local computer something that's not 'backed-up' in the gerrit server.
When trying to use the suggestions in that question is that when using Gerrit the results also lists commits that fall under the category of published commits that haven't been accepted to repo. They are shown with published/BRANCH_NAME
marker in gitk. I only want to show commits that haven't been pushed to the remote gerrit repository even if they weren't accepted.
For example, if I use git log --graph --branches --not --remotes --decorate
among the commits I get
commit 51blahblah123...456blah42e3 (refs/published/blah_fix, blah_fix)
Author: xyz <...>
Date: Wed Jul 22 12:28:39 2012 -0500
Commit description
Change-Id: I83ae...blah...184
Those are the kinds of commits I'd like to skip. In gitk the last published commit shows with a purple background instead of the green background on branch names. Is there an equivalent of --remotes
for those?
I tried also using git log origin/master..HEAD
but I got the following error:
fatal: ambiguous argument 'origin/master..HEAD': unknown revision or path not in the working tree.
So instead I tried using a specific revision (I think I am using a work branch instead of the remote's master branch) and it worked but that kidna defeats the purpose since I'd have to go look for all the branches.
I also considered git log @{u}.. --graph --decorate
but that seems to skip the branches that I failed to create (by mistake) with remote tracking.