Source code vs git history
AI labs price a repo in two parts. Source is your code as it stands today. History is every earlier version of it. Pangea pays $100 per million tokens of source and $40 per million tokens of history.
| Source | History | |
|---|---|---|
| What it is | The files in your latest commit | Earlier versions of your files, on all branches |
| Rate | $100 per million tokens | $40 per million tokens |
| How to count it | githubworth, in your browser | One command on your machine |
Source is the code in your latest commit
Source is what you see when you open the repo today: the files git holds at your latest commit. Code files count in full. Docs, config and data files count up to ten times the code. Dependencies, build output and minified files are left out. Four bytes make one token.
History is every version your code went through
Each time you commit a change, git keeps the old version of the file and adds the new one. A file you edited 40 times leaves 40 versions behind. Files you later deleted, branches you never merged and experiments you reverted are all part of it.
The counter adds up each unique version once, skips the versions already counted as source, and caps any single file path at 100 MB. The same skip rules apply, and docs again count up to ten times the code.
History can hold more tokens than the source
Because git stores each version whole, a repo with a few years of commits can hold several times its current size in history. History is priced lower, but it pays more than the source once it holds over 2.5 times as many tokens. Pangea says on its code licensing page that git history carries most of the value.
An illustration with round numbers, not a real repo:
| Tokens | Rate | Value | |
|---|---|---|---|
| Source | 2,000,000 | $100 / M | $200 |
| History | 10,000,000 | $40 / M | $400 |
| Total | $600 |
Labs pay for history because it shows how code changes
A snapshot shows the finished code. History shows the work: the bug and the fix that followed, the refactor that got rolled back, the test added after an incident, and the commit message that explains why. That record is what coding models learn from.
Squashing or rewriting history lowers the price
- Squash merges turn a branch of commits into one.
- Rebasing and force-pushing can drop old versions for good.
- Tools like git filter-repo rewrite history to remove files.
- Starting a fresh repo from a copy, or a ZIP download, keeps no history at all.
Submit the repo as it is, after you rotate any keys that were ever committed. Pangea scrubs secrets, credentials and personal data from its copy. Customer data has to stay out.
Count your history with one command
pre.dev, which prices repos for Pangea, publishes its counter as a script. Run it on a full clone. It prints source tokens, history tokens and the value for each repo, and sends nothing anywhere.
curl -fsSLO https://api.pre.dev/api/code-licensing/estimate.mjs node estimate.mjs /path/to/repo
It needs git and Node 18 or newer, and it takes a folder of repos too. If your clone was made with --depth, run git fetch --unshallow first, or the history comes out short.
Questions
Is git history worth money?
Yes. Pangea pays $40 per million tokens of git history, on top of $100 per million tokens of source, for private repos you own.
Does a squashed repo lose value?
Yes. Squashing turns many versions into one, so the history tokens go down. A repo re-created from a copy or a ZIP download has no history at all.
Do deleted files count?
Yes. A file you deleted still lives in the commits before the deletion, and each of its versions counts as history.
Do other branches count?
Yes. The counter reads all branches and tags in your clone, merged or not.
Why can't the website count my history?
History sits in git's packed object files, which a browser cannot read through the GitHub API in a practical way. The command reads them on your machine and sends nothing anywhere.
Should I remove secrets from my history first?
Rotate any key or password that was ever committed, whatever you decide, since anyone who reads the history can see it. Pangea says it scrubs secrets, credentials and personal data from its copy, and asks you to tell it about anything sensitive you know of. Customer data has to stay out of what you submit. Rewriting history to remove files also removes priced tokens.
Rates from Pangea's code licensing page and rules from pre.dev's pricing script, checked October 20, 2026.