The reason github can’t show you which branch this commit is on is because commits themselves don’t know about the concept of branches. They only have a pointer to their parent commit(s). In order to look up which branches contain a commit, git must start traversing all branches from their tip upwards and match the SHA.