Skip to content
Insights · Engineering

Which commit did that ref name?

Name the commit that ref named: the sha, the message, and the tree. A second sample can share the sha. Another repository omits it.

Scroll
EngineeringOct 30, 202612 min readBy Salman Naqvi, Founder & CEO
Which commit did that ref name?

A client says the tag is the release they bought, or says the branch they were shown is the commit that is live. Tonight, three proofs, in a repository the agency or the client can open. Name the commit that ref named: the sha, the message, and the tree, or write that the ref was not there. Show a different commit whose sha, or whose message, is not this one. Show another client's repository that does not list this sha. If any of the three needs a dashboard you cannot open, you have not named the commit. You have a branch name and a guess.

This is one Git commit object. It is not the release a tag named. Which release did that tag name? is a release id, a tag, and a draft flag. A tag can exist while this commit's message is a different string, and a release id is not a sha. It is not the branch a pull targeted. Which branch did that pull target? is a base ref and a head ref. A ref name can move. The commit it points at is the object. It is not the digest the client is running as a deploy record. Name the commit the client is running is the digest of what is live, which may be a ref that has moved since the build. A live digest is not this message. It is not the cash a transfer funded. Which cash did that transfer fund? is a cash id. It is not the secret a session minted. Which secret did that session mint? is a client secret. A sha is none of those.

None of what follows is a permission grant for this client, and none of it is legal advice. The fields below are one host's current create sample and get sample of a commit object. The samples share a sha and do not share a message, a tree, a parent, or a node id. The schema length below is a field rule, not a census of your repositories. A message on an example is not the commit the client's tag named tonight.

GitHub's create response and GitHub's get response print the same sha and do not print the same commit. The sha is 7638417db6d59f3c431d3e1f261cc637155684cd. 40 characters. The create request sends the parent sha 7d1b31e74ee336d15cbd21741bc88a537ed063a0, also 40 characters, and the tree 827efc6d56897b048c772eb4087f854f46256132, also 40. The create message is my commit message. 17 characters. The author name on the request is Mona Octocat. 12 characters. The email is octocat@github.com. 18 characters. The request date is 2008-07-09T16:13:30+12:00. 25 characters. The response author name is Monalisa Octocat. 16 characters. 16 is not 12. The response date is 2014-11-07T22:01:45Z. 20 characters. 20 is not 25. The request offset is twelve hours ahead of UTC, so the UTC instant is 2008-07-09 04:13:30. From that instant to 2014-11-07 22:01:45 is 199,820,895 seconds: 2,312 days, 17 hours, 48 minutes, and 15 seconds. The page does not print that gap. The response message is my commit message on the create sample, which matches the request, and the committer name is Monalisa Octocat, which does not match Mona. The tree sha on the create response is 827efc6d56897b048c772eb4087f854f46256132, which matches the request. The parent sha is 7d1b31e74ee336d15cbd21741bc88a537ed063a0, which matches the request. verification.verified is false. reason is unsigned. 8 characters. signature is null. payload is null. verified_at is null. The request sent a signature that begins -----BEGIN PGP SIGNATURE-----. 29 characters. A null signature beside a request that sent one is what the create sample stored. It is not a verified commit, and unsigned is not a reason to pretend the request body was empty (GitHub, Create a commit).

The get sample keeps the sha and replaces the rest. The message is added readme, because im a good github citizen. 46 characters. 46 is not 17. The tree is 691272480426f78a0138979dd3ce63b77f706feb. 40 characters, and not 827efc6d56897b048c772eb4087f854f46256132. The parent sha is 1acc419d4d6a9ce985db7be48c6349a0475975b5. Also 40, and not 7d1b31e74ee336d15cbd21741bc88a537ed063a0. The parent's git url uses 1acc419d4d6a9ce985db7be48c6349a0475975b5. The parent's html url uses 7638417db6d59f3c431d3e1f261cc637155684cd, which is the commit's own sha, not the parent sha. Both html urls are 86 characters. Same length is not the same commit. The api url of the commit is 101 characters. 101 is not 86. The tree url is 99 characters. 99 is not 101. author date and committer date are both 2014-11-07T22:01:45Z, the create response's clock, not the request's 2008 date. verification is again unsigned, verified false, signature null. Same sha, two messages, two trees, two parents, and a parent html url that points at the child. Do not paste the get message onto the create response because the sha matches (GitHub, Get a commit object).

The node ids are the part a screenshot will not show, and they do not encode the same sha. The create node id is MDY6Q29tbWl0NzYzODQxN2RiNmQ1OWYzYzQzMWQzZTFmMjYxY2M2MzcxNTU2ODRjZA==. 68 characters. Decoded, it is the prefix 06:Commit and then 7638417db6d59f3c431d3e1f261cc637155684cd, which is the sha the object printed. The get node id is MDY6Q29tbWl0NmRjYjA5YjViNTc4NzVmMzM0ZjYxYWViZWQ2OTVlMmU0MTkzZGI1ZQ==. Also 68 characters, and not the same string. Decoded, it is the prefix 06:Commit and then 6dcb09b5b57875f334f61aebed695e2e4193db5e. That second sha is 40 characters, and it is not 7638417db6d59f3c431d3e1f261cc637155684cd. The get object says its sha is 7638417. Its node id says 6dcb09b5. Those two strings are 40 of 40 characters, the same length, and not the same commit. Hello-World is 11 characters. octocat is 7. The email local part is octocat, not Monalisa, and not Mona.

The status codes are not the object. Create returns 201. Get returns 200. 201 is not 200. A missing ref on the get path is a 404. A conflict is 409. A validation failure is 422. The sample you are reading is the 201 body and the 200 body. Neither of those bodies is a 404. The accept header the page recommends is application/vnd.github+json. 27 characters. The API version header in the example is 2026-03-10. 10 characters. 10 is not 27, and 10 is not 40. A version date is not a commit date. The create request's date and the stored date already disagree by 2,312 days. A header version does not close that gap.

Do the three proofs on one real ref, in the repository that actually holds it. First, the binding. Copy the ref name, the sha it points at, the commit message, the tree sha, and the parent sha. If the node id decodes to a different sha, write both. The get sample is that shape: the field says 7638417 and the node id says 6dcb09b5. If the html url of a parent points at the child, write both urls. Do not copy my commit message onto a get that prints the longer sentence. Second, the other commit. A different sha, even under the same ref name on a different day, is not this one. Two samples that share 7638417 and do not share a message are not one commit you may describe once. A branch name is not that second commit. Third, the other repository. A repository that belongs to another client does not list this sha. If the only history is one shared organization and you cannot say whose ref it is, write that. A tenant you cannot name is the finding.

Three moves feel like the proof and are a second problem. Force-updating the ref because the message was embarrassing, and then describing the missing sha as a cleanup. Updating a ref changes where the name points. It does not make the get sample's message equal the create sample's message. Quoting a platform share because it looks precise, while the commit you were asked about is one sha, and the two samples that printed 7638417 had already stored two trees. Asking a model which commit the tag names. The model will pick a plausible message. It will not open the object. A release you have not kept is which release did that tag name?. Opening that screen does not name this sha, and a draft flag is not a tree.

The path is ordinary when an operator can open one client's repository without opening the next client's repository as the way to prove it. Gigbase is one agency workspace of projects, clients, and a subscription, distinct from the next client's repository. The shape that matters here is one repository you can point at. That case is not a commit ledger. Nothing in that sentence is a headcount, a duration, or a result figure. If the only control on the screen moves every client's default branch together, you do not have this proof. You have a template.

There is a version of this afternoon where taking the work is the wrong purchase. The work is not sold under the agency's name, and the client asked to meet the people who will push. The room only has a slide of a branch name. The buyer only wants a template repository with the history already squashed. Or the buyer wants a legal opinion about who owns the commit. A sha you cannot open is not a delivery. The page for a white label software development partner is the offer when the agency keeps the client relationship and the repository is one the client can open. It is not a promise that 7638417 is the sha on their tag.

When the client is real and the ref cannot name the commit, the missing object is specific. A read, in a repository the agency or the client can open, that shows one sha, one message, and one tree, shows a different commit that is not that one, and shows another client's repository without it. If the first slice is a fixed capability, an AI integration sprint is the shape where the acceptance sentence can include the three proofs. If you do not yet know which host stores the ref, a two-week AI readiness assessment maps the systems. The findings are yours. They are not a promise that a node id will decode to the field beside it. If what you are buying is the product around that repository screen, the offer is an AI product development company.

Before you tell them which commit the ref named, do the three proofs and write the sha. Name the sha, the message, and the tree. Show a different commit that is not that one, even if a sample reused the sha. Show another repository's ref that does not contain it. Do not paste the get message onto the create response, and do not paste 6dcb09b5 into a field that prints 7638417. The binding is the commit you can defend.

Questions

Three records, in a repository the agency or the client can open. The sha, the message, and the tree, or a written line that the ref was not there. A different commit whose sha or message is not this one, even when a sample reused a sha. Another client's repository that does not list this sha. If any of the three needs a dashboard you cannot open, you do not have the proof.

No. Two published objects can print 7638417db6d59f3c431d3e1f261cc637155684cd and still disagree on the message, the tree, the parent, and the node id. A commit you can defend is the sha, the message, and the tree on the repository you opened. A node id that decodes to 6dcb09b5 is not a field that prints 7638417.

When the work is not sold under the agency's name and the client asked to meet the builders, when the room only has a slide of a branch name, when the buyer only wants a template, or when the buyer wants a legal opinion about who owns the commit.

Find this useful? Tell Google to show you more of it.

Let's put AI to work in your business.

A 30-minute call. You bring the workflow or the roadmap — we'll tell you what's feasible, what it costs, and what we'd build first.

Book a call→