Lines of Code Merged

Lines of code merged is measured as the sum of additions and deletions integrated to the trunk/main branch of a repository. Commits to local and remote branches that are not the default branch are excluded.

For example, if you made a commit with 10 additions and 10 deletions that was pushed to the main branch, your total lines of code merged would be 20 lines.

Speed, volume, and quality

Historically, lines of code has been a controversial metric because it is sometimes used as the sole measure when trying to better understand developer productivity. Any metric, for that matter, can be easily gamed and result in the wrong behaviors when measured without context.

A high-performing system balances speed, volume, and quality. Lines of code is one measure of code volume. When compared with other metrics—such as lead time and commit frequency—you can get a clearer picture of the overall throughput of your engineering system.