简体   繁体   中英

Same commits between two branch after merge

I have two branches devel and next . In devel I have a more or less huge amount of commits. Some of the commits are cherry picked into next. Also I added some commits to next and I have commits which are merged from devel .

Now I would like to see which commit is missing in next from devel , so I can cherry-pick the missed commit to next. My question is now,

How to check same commits between the devl and next The commits from devel is there or not in next ? If not there I would have to cherry-pick to next .

You want the cherry-pick-related options git log has, one of --cherry-mark , --cherry-pick :

git log --cherry-mark next...devel        # <-- three dots, not two, for symmetric diff.

Do note that any text-diff-based solution can be fooled here, and avoiding even the off chance is one of the reasons to do only recorded merges in published work.

You can do

git log devel..next

This will show you commits that devel has but not in next

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM