Skip to content

Git Diff Sources

Skim shells out to git in your current directory and follows git’s own diff conventions, so the argument you’d pass to git diff is (broadly) the argument you pass to skim.

Terminal window
skim

Shows unstaged changes in your working tree: the same set git diff would show.

Terminal window
skim --staged

Shows what you’ve staged: the equivalent of git diff --staged. You can stage files from inside the TUI with a / A; see staging.

Terminal window
# Working directory compared to a branch
skim main
# Staged changes compared to a branch
skim --staged main
Terminal window
# Two branches
skim main feature
skim main..feature
# Two commits
skim abc123..def456

Both the space-separated (main feature) and range (main..feature) forms compare the two endpoints directly.

Terminal window
skim main...feature

The three-dot form compares against the merge base. It shows the changes made on feature since it diverged from main, ignoring changes that landed on main in the meantime. This is usually what you want when reviewing a branch for merge.

Terminal window
# Working directory vs. 5 commits ago
skim HEAD~5

Any ref git understands works, including HEAD~n, tags, and SHAs.

Because Skim runs git in your working directory, it inherits your git configuration automatically: diff settings, includes, and credentials all apply exactly as they would on the command line.

See also the command-line usage reference.