Quick wins for a faster PC:
Repair Windows errors before they cause bigger problemsFix Now →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Because git blame reports the last commit that touched each line, it can credit you with code you never composed. In a DEV Community post from September 2026, a developer who goes by Lex described exactly this. An automated updater copied upstream files into a fork, Lex committed the result, and blame assigned all 767 lines to the local commit. Git did nothing wrong. The command answered a narrower question than the one people usually ask of it.
What git blame actually answers
Git’s documentation describes git blame as annotating each line of a file with information from the revision that last modified it. That is a statement about repository history. It is not a statement about who thought up, typed or originally published the line.
As an Amazon Associate I earn from qualifying purchases.
When bytes arrive in a commit, blame cannot tell whether a person wrote them, a tool generated them, or they were copied from somewhere else. If the commit’s diff shows the line as added or changed, that commit gets the credit. A vendored update, a bulk sync, a generated file or a mechanical reformat will all produce the same effect.
Do these 3 things before closing this tab:
1Repair Windows errors before they cause bigger problems2Scan for outdated or missing drivers - takes under a minute3Clear out junk files and repair common Windows errorsThe incident, in the author’s words and numbers
According to Lex’s account, an automated update wrote upstream files into the author’s fork, and the author committed those files. Local blame then named the author as the source of all 767 lines, even though, by the author’s account, the underlying code came from upstream. The repository itself was not independently reviewed for this article, so the details below are the author’s report.
#1 Best Overall
The useful part is what happened next. Lex ran blame against origin/main, the upstream history, and got a different picture: three contributors with 301, 246 and 66 surviving lines respectively. An earlier contributor’s lines no longer survived in current blame. Those are counts for that one file set in that one repository. They are not a Git statistic and not a measure of anyone’s overall contribution.
How to investigate when blame points at you (or someone else) unexpectedly
- Look at the commit blame names. Run
git show <commit>orgit show --stat <commit>. A commit that touches hundreds of lines across many files, with a message like “update” or “sync”, is a candidate for an import. - Read the message and compare with the parent. Check what the commit says about its source, and diff it against its parent to see whether the change looks like a wholesale replacement.
- Identify the mechanism that wrote the files. In Lex’s case this was an automated updater. A script, bot, submodule-like sync or code generator leaves traces in its configuration and logs.
- Blame against the upstream history. If the upstream remote is configured, run blame at the upstream reference, for example
git blame origin/main -- path/to/file. The result is only as meaningful as the remotes: it assumesoriginreally is the upstream whose history you want, and that the history was fetched. In a fork, upstream is often a separate remote, so checkgit remote -vfirst. - Compare the local file with upstream. Do not assume the latest committer created every line. Diffing the local file with the upstream version shows what is identical and what you actually changed.
Blame options that change what it reports
Git documents several options that alter how lines are attributed. They help with some investigations, but none guarantees recovery of original authorship. Check the behavior against the Git version you have installed.
Rank #2
| Question | Option | What it does |
|---|---|---|
| Was this line moved or copied within the same file? | -M |
Detects moved or copied lines inside a file, so credit can stay with the earlier commit. |
| Did it come from another file? | -C |
Detects lines moved or copied across files. |
| Is a known mechanical commit hiding the real history? | --ignore-rev <commit> |
Treats the named revision as if it did not change the lines, passing blame to earlier history. |
| Are there several such commits? | --ignore-revs-file <file> |
Reads a list of revisions to ignore. |
These options only work on history that exists in the repository. If the import was a plain file copy committed in one step, with no earlier copy of those lines in the history you have, -M and -C have nothing to find. That is why the upstream comparison above matters.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Ignoring revisions changes the attribution view you are looking at. The result is a different reading of history, not proof about who wrote anything. If you share it, say which revisions were ignored.
Finding when a snippet entered history
Git’s documentation also points to history search for the question “when did this code appear, move or disappear?” Blame is the wrong tool for that. Commands such as git log -S "some text" (changes in the count of a string) and git log -G "regex" (changes matching a pattern) list the commits that introduced or removed matching text. Use them when you need the first appearance of a fragment rather than the last modification of a line.
The second lesson: a source-support gate checks backing, not truth
The same post describes a gate that checks whether each claim in generated output has backing text in a set of source files. Lex reports that it rejected four real concepts because the output used synonyms not present in the source files, and later rejected an unsupported number. The rule was whether a claim had support in the sources, not whether it was true in the world. That is the same shape of mistake as blame: a check that is accurate about its own narrow question, and easy to read as answering a broader one.
Rank #4
The practical takeaways from the account are modest:
Free tools Windows power users keep installed
One-click scans. No signup required.
- Maintain the source corpus the gate checks against.
- Keep the configuration that lists allowed facts under version control.
- Record provenance for any allowed figure.
- Expect a strict check to reject true statements whose wording the sources lack.
The evidence is thin, and the author says so. The gate had been wired in for four days, with three abort messages in the logs. Notes suggested roughly six, but those overlapped the logs, and the author treats three as the defensible logged count. There was no aggregate counter and no control group. Treat it as one operator’s observed case, not an effectiveness rate. No population-level figure turned up for how often blame is mistaken for authorship, or for how well claim-checking gates work generally.
Quick Recap
Best Value
Reporting blame results responsibly
- Say “last modified by” rather than “written by”.
- Name the reference you blamed against (local
HEAD,origin/main) and any ignored revisions or-M/-Cflags. - If a commit is an import, say so and point to the upstream source.
- Remember that surviving-line counts describe what remains in the current file, not the effort of people whose lines were later replaced.
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

