简体   繁体   中英

commits missing in master from branch

I have a git repo in which some changes went into a release branch, but I've lost track if these are also in master branch.

Using git cherry I get only 3 commits as missing between master and the release branch.

However, on the github page if I go to the release branch, it says that it is 10 commits ahead of master (and even some commits behind master - but I don't necessarily care about that)! How is that possible if on the console I get something else? Thank you!

How is that possible if on the console I get something else

First, make sure to do a git fetch, in order to be sure to have the local history of the remote repo origin up-to-date.

Second, git cherry , used to see which commits in one branch aren't in the other , works with the content of the commits, not their metadata (date, author, ...).
Whereas a branch comparison (simple diff) compare the commits themselves, which have different SHA1. See " git ahead/behind info between master and branch? " in order to get the same result locally.

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