Reputation: 60004
I screwed up pull with rebase (there were conflicts and I resolved them incorrectly). I think that the easiest way out now is to blow the tree and reapply my patches that are missing in the upstream (there are less than 10 of them).
So, how do I get the list of the commits that are present in the local tree but absent from the upstream master
? (to be exported using format-patch
).
$ git remote -v
origin [email protected]:sam-s/vowpal_wabbit.git (fetch)
origin [email protected]:sam-s/vowpal_wabbit.git (push)
upstream git://github.com/JohnLangford/vowpal_wabbit.git (fetch)
upstream git://github.com/JohnLangford/vowpal_wabbit.git (push)
Upvotes: 4
Views: 4677
Reputation: 7497
You can use the cherry
tool;
git cherry -v origin/master
will list all patches which exist in the current HEAD, but not in master. It will prepend a +
for patches which don't exist in origin/master, and a -
for patches which exist in master but under a different commit (e.g. commit message changed or as a result of a rebase).
Upvotes: 7
Reputation: 41209
To show the commits in local-branch
but NOT in origin/master
:
git log local-branch ^origin/master
Replace origin
with the name of the remote (upstream
in your case).
Source (and duplicate?): Using Git, show all commits that are in one branch, but not the other(s)
Upvotes: 4