Commits Behind and Commits Ahead Doesn't Match the Number of Commits Returned by Git

When using Copado Branch Management, you may notice that the number of commits in the tabs Commits Behind and Commits Ahead is different than the number of commits returned by Git when doing a pull request between the same two branches.

Due to performance implications, Copado calculates the commits in a different way than GitHub or other providers. This is the reason why you might see more or less commits with regard to the number returned in Git.

The article Git Branch Divergence Calculation explains how branch divergence is calculated in Copado.

Please note that we are planning to deprecate the tabs Commits Behind and Commits Ahead in the future. Our recommendation is that you use the File Differences and User Stories Ahead and Behind tabs when working with Copado Branch Management. Additionally, if you want to know the exact commit difference between branches you can check this in Git.

How did we do?