views:

62

answers:

2

I'm using git. I have a branch, apifixes, that was branched from master some time ago. Most, but not all, of the changes from the apifixes branch have been merged back into master. At least, I believe this is the case, because when I try to do

git branch -d apifixes

I get the following error:

error: The branch 'apifixes' is not an ancestor of your current HEAD.

How can I tell which changes are in apifixes but not in master?

+1  A: 
git log master..apifixes

show commits reachable from apifixes, but not from master

if you want to show the difference between the two, use git diff instead

knittl
I might have misunderstood your answer, but `git log master..apifixes` does not show me changes that are *only* in `apifixes` and *not* in `master`. Am I missing something?
Will McCutchen
yes, `master..apifixes` will only show you changes in `apifixes` and not in `master`. am **i** missing something? i thought that was your question »How can I tell which changes are in apifixes but not in master?«
knittl
if you cherry-picked single commits from apifixes and applied them to master, this will also show the cherry-picked commits in the log. git compares ancestry information and not actual commit contents.
knittl
Now that I'm back at work, I can try again. I think this must be what has happened. Thanks!
Will McCutchen
A: 

git log --oneline --left-right --cherry-pick master...apifixes (note the three dots ...) might be what you want.

Jakub Narębski