Git blame & file history in the editor¶
If your source lives in a Git repository, Understand reads that repository directly (using an embedded
Git library — no separate git executable required) and surfaces commit information right in the
editor: who last changed each line, the commit behind it, and the file's full history — with a
side-by-side diff for any commit.
Blame margin — who changed each line¶
Turn on the Blame margin and the editor shows, next to each line, the initials of the author who last changed it, with lines colour-coded by commit age (a heat map from newest to oldest). To show it for every file, enable Blame in the editor settings — Understand → Preferences → Editor on macOS, or Tools → Options → Editor on Windows/Linux — where it's one of the toggleable editor margins. To turn it on for just the current file, use the Toggle Blame Margin button on the editor toolbar. Hovering a blame line shows a tooltip with the full author, date, commit message, and the abbreviated commit id.
Inline blame — full commit details on a line¶
For more than initials, enable Show Inline Blame (the Version Control section of the editor settings). Selecting any line then shows the author, commit date, message, and commit ID for that line, inline in the editor.
File history in the Information Browser¶
The Information Browser has a History node for any file that is tracked in Git. Expand it to see a chronological list of every commit that touched the file; each row shows the author's initials, the date, and the commit message. (A working-tree entry appears as Uncommitted Changes.)
The history diff view¶
Click a commit in the History node, or click a line's entry in the blame margin, to open a History diff tab for that file at that commit (also reachable via the editor toolbar's Open File History button). It's a side-by-side diff with the older version on the left and the newer on the right, so you can see exactly what that commit changed.
- Step between commits with Next/Previous View — you can walk the file's history whether or not a commit is pinned.
- Pin a commit to either side from the diff's hamburger ( ) menu — the Pin submenu → Pin Left Commit / Pin Right Commit (or None to unpin) — to hold one side fixed while you move the other.
- All the usual diff controls apply — word-level highlighting, the radar scrollbar, and Next/Previous Difference.
You can also open the history diff for the file in the active editor directly via Compare → File History, and copy a selected commit's id with Copy Commit Id.
More Git across Understand
Blame and history are the editor slice; Understand uses Git elsewhere too:
- Compare two versions of a project — set a comparison database pinned to a Git commit and diff the whole project.
- Auto-generate architectures from Git —
self-updating architectures grouped by author, code owner, or churn. (These Git plugins shell
out to a
gitexecutable, unlike the editor's blame and history, which use the embedded library.) - View & triage violations — filter CodeCheck violations by Git (uncommitted lines, files modified recently, or a commit/branch/tag).