For a commit to be factored into the Historical Stats that GitClear offers, it must be deemed to have been committed to the repo's default branch, or it must be sufficiently recent that it's reasonable to assume that the commit will soon be merged to the default branch.


In this help page, we'll dive into more details about how GitClear determines whether a commit's branch entitles that commit to have its Diff Delta counted within the site stats.


linkCommit recency

Standard work in a repo happens via branches that are merged in pull requests. In general, we want to capture this "work in progress" activity into the historical stats, since if we waited until a PR was merged before including it, the historical graphs would always indicate that productivity had taken a steep dive within the past month (because the most recently authored work generally won't get merged to the main branch for a few weeks after being authored).


GitClear balances these concerns by setting a date threshold of 2 months for commits to be merged to the default branch. If a branch has gone stale for longer, then the commits in the branch have their Diff Delta stripped and the historical stats treat the unmerged work as if it never happened.


linkViewing (or changing) the default branches

Each repo in GitClear has a "default branch" assigned to it, and this default branch determines which commits will receive Diff Delta. You can see the default branches for your repos if you visit your Entity's settings:




In the "Repo List" the word in parentheses is the default branch for each repo

The default branch can be changed by visiting the "Details" tab within settings for a particular repo, or by clicking the "edit" link next to any of the repos in the "Repo List" shown in an entity's "Details" tab.


It should be extremely rare that you need to change the default branch. In thousands of repos imported as of 2021, we have never seen a customer need to change the default branch, but we offer the option just in case.


link"Force pushed to oblivion" status

Sometimes when developers are working on a feature, they will use a git force push to add and remove experimental commits that aren't going to be merged to the main branch. GitClear detects when force push is used to remove commits from a branch. When a commit has been removed, its status when viewed in a diff will be shown as "Force pushed to oblivion," and the commit will receive no Diff Delta.