"That PR is 20 commits behind origin/main" doesn't quite make sense to me unless my SVN habit of upgrading to the latest and greatest and "testing" before a commit is not required or always done in GitLand. Perhaps it should be until unrelated tests stop breaking?
So, I don't know if you're familiar with branches in SVN, but it's very loosely analogous.
You may hear that git is a tree (technically incorrect in the presence of merges), or a directed acyclic graph (if you want to get technical about it), where the edges correspond to commit ancestry.
Traditionally in git, branches are not special. By convention, master (main in github) is the default branch when creating a new repository, but you don't need to keep it around if you would like it to be called "fronos-awesome-branch" instead. Commits are not numbered, but rather just know about their parent(s). (A commit can have multiple parents if it's the result of a merge.)
When you create a new branch, you declare a certain commit to be the HEAD of that branch. You can then add descendant commits, which will show up in that branch, or merge the histories of two (or more) branches. But there's no requirement to merge in your main branch (since main isn't special -- you could delete it if you wanted), much less the main branch of a specific remote repository (e.g. origin/main).
(Note that "origin" is also not a special remote name nor is it required by git. It's the default remote name if you clone a repository without giving it an explicit name.)
I'll present a concrete example.
This branch says: "This branch is 3 commits ahead, 23 commits behind kolmafia:main."
What that means is that the branch contains 3 commits not in kolmafia:main (
2f64b4b,
afcefca,
5c8de80), and the last common ancestor (
4fe6139, as added by
a merge, which you'll note has two parents) was 23 commits prior to the current head of kolmafia:main as of when I checked just now.
(I don't know if that helps clear things up, but I hope it does.)