# Browse history and blame

Read a repository's commit history, inspect a single commit, and see who last
changed each line of a file. You need read access to the repository.

## Browse commit history

Open **Commits** from the repository's **Code** toolbar. The ref switcher
chooses the branch or tag; without one, the default branch is shown. Each row
shows the commit summary, short hash, author and time. History follows first
parents. Choose **Load more commits** for older commits.

```sh
cafe repo code commits --ref main
```

## Inspect a commit

Select a commit's hash or summary. The commit page shows the full message, the
author and date, the committer when different, and links to each parent
commit. The code icon opens the file tree at that commit.

Below the header is the diff against the first parent, with unified or split
view, per-file collapse and a file tree. A root commit has no parent and shows
no diff. Very large commits may omit some file diffs; the page says so.

Commit hashes in history, on the branches and tags pages, and in the blame
gutter all link to the commit page.

## See who changed a line

Open a text file from the **Code** page and choose **Blame**. The gutter shows
which commit, author and date last changed each group of lines; select a hash
to open that commit. Markdown files offer **Preview / Code / Blame**; other
text files offer **Code / Blame**.

Blame covers the first 2,000 lines of a file. A notice appears when the file
is longer.

## Signed commits

A signed commit shows **Verified** or **Unverified** next to its summary.
Unsigned commits show no badge. To have your own commits verified, add your
signing key as an [SSH key](https://staging.git.cafe/docs/account/ssh-keys.md) with signing usage or as a
[GPG key](https://staging.git.cafe/docs/account/gpg-keys.md).
