Repository navigation
Git Graph
English | 한국어
Use the Git graph tab to browse a repository's commit history, switch to a branch, tag or commit, and create a branch.
Press ⇧⌘H to open it. The tab shows the latest 1,000 commits of all branches in the repository of its working folder as a graph (git log --all --topo-order).[^graph] It reads the history the first time you view the tab.
| Column | Contents |
|---|---|
| Branch/Tag | Labels that point at the commit. Only the first label is shown, and the rest collapse into +N. Point at +N to unfold all labels of that row in place, over the graph; they fold again when the pointer leaves |
| Graph | Lanes and commits. A commit shows the author's avatar in a ring of the lane color where the author changes: at the start of a lane, on a commit with a branch or tag, and when the author differs from the commit above in the same lane. Other commits and merge commits are small dots. The checked-out commit has an extra light ring |
| Description | The commit subject |
| Author, date, hash | The date is relative, such as "3 days ago". The hash shows the first 7 characters |
- Labels take the color of their lane. Icons distinguish local branches, remote branches and tags.
- A local and a remote branch with the same name on the same commit share one label. Refs such as
origin/HEADare hidden. Each stash entry (stash@{n}) shows as a label with a box icon on the commit it was made on, instead of its own row. - With more than 8 lanes, the graph is cut so that the text does not shift.
Click a commit row to open its details below. Click the same row again to close them.
- Full hash with a copy button next to it, author and email, date, all labels, whether it is a merge commit
- The full commit message
- Changed files, with lines added and removed for each (binary files show "Binary"). A merge commit is compared with its first parent.
- Checking out the commit and creating a branch are in the right-click menu. After Compare with Working Tree, the file list shows the changes since the commit instead
The buttons right of the search box act on the repository the tab shows (with nested repositories, the one picked in the repository switcher).[^ops]
| Button | Git command that runs | Available when |
|---|---|---|
| Fetch | git fetch --all --prune |
The repository has a remote |
Pull ↓N
|
git pull --ff-only, --rebase or --no-rebase
|
The branch has an upstream. The arrow next to it picks the mode; the default follows pull.rebase and pull.ff
|
Push ↑N
|
git push |
The branch is ahead of its upstream |
| Publish Branch | git push -u <remote> <branch> |
Shown instead of Push when the branch has no upstream |
| Branch | git switch -c <name> |
Always |
| Stash / Pop |
git stash push / git stash pop
|
Tracked files changed / a stash exists |
| Commit | Opens Source Control and puts the cursor in this repository's commit box | Always |
↑N and ↓N are the commits ahead of and behind the upstream. While a command runs, a progress line shows under the toolbar and the window stays usable. On success a notification appears; on failure the error shows in that line.
The graph stays current without a refresh button. cozzle runs git fetch --all --prune in the background and then reads the history and the status again:
- when the Git graph becomes visible: you open the tab, select it, show its split pane or workspace again, or bring the cozzle window to the front while the graph is visible. If a fetch started less than 15 seconds ago, or another command or a confirm line is open, it is skipped.
- before every action that talks to the remote (Pull, Push, Publish Branch, Push to, Delete on the remote), except Force Push (With Lease)…. A fetch right before a force push would update the remote branch the lease compares with, so the lease could no longer protect commits on the remote. Local actions such as checkout, branch, tag, stash, merge or reset do not fetch first, so they run at once on the branches you see.
If that fetch fails (offline, no sign-in, no remote), the remote action stops and shows the fetch error in the line under the toolbar. A failed background fetch shows only that line, never a dialog.
The automatic fetch does not run commands from the repository's own Git config: hooks, core.sshCommand, core.askPass, credential helpers and remote.<name>.uploadpack set in the repository are ignored (each remote is fetched with --upload-pack=git-upload-pack), and only the https and ssh transports are allowed (remotes using http, git:// or a local path are fetched only when you press Fetch). Credential helpers and SSH settings from your global Git config still apply. Submodules are not fetched.[^ops]
Commands run as normal git, so your hooks and credential helpers apply. cozzle never shows a password prompt: if Git needs to sign in, the error says to run the command in a terminal tab.
Menus are split into groups by lines. An item that the current state does not allow stays in the menu, dimmed, and pointing at it shows why (for example Pull shows "No upstream", Merge and Reset show "HEAD is detached"). Use ↑/↓ to move, Enter to run and Esc to close.
Commit row:
| Group | Items |
|---|---|
| Check out and create | Check Out This Commit (Detached HEAD), Create Branch Here…, Create Tag Here… (lightweight), Create Annotated Tag Here… (the tag message is the tag name, so no editor opens) |
| Change the current branch |
Cherry-Pick, Revert (merge commits use the first parent), Merge <branch> into the current branch (when the row is the tip of a branch that is not checked out), Rebase the current branch onto this commit, Reset Current Branch to Here ▸ → Soft, Mixed or Hard (Hard asks first) |
| Rewrite the current branch | Edit Message…, Squash into Parent…, Drop Commit… (see Squash, drop and edit message) |
| Compare |
Compare with Working Tree, Select for Compare, then on another row Compare with <hash>. The details panel lists the files that differ |
| Copy and open |
Copy Commit Hash, Copy Short Hash, Copy Message, Copy Author (Name <email>), Open on GitHub (origin on github.com only; opens …/commit/<hash> in a cozzle browser tab) |
| Labels on the row | Check out or copy the name of each branch and tag on that row |
Label (only the items that fit the label kind are shown):
| Item | Local branch | Remote branch | Tag | Git command |
|---|---|---|---|---|
| Check Out | ✓ (not the current one) | ✓ creates a local tracking branch | ✓ detached |
git switch, git switch --track, git switch --detach
|
| Pull | current branch only (dimmed without an upstream) | as the toolbar | ||
| Fetch | ✓ | ✓ | git fetch --all --prune |
|
| Merge into / Rebase … onto This the current branch | ✓ | ✓ | merge only |
git merge --no-edit, git rebase
|
| Push to the remote | ✓ | ✓ | git push <remote> refs/…:refs/… |
|
Push and Track <remote>/<branch>
|
when the remote has no branch of that name | git push -u |
||
Track <remote>/<branch>
|
when the remote has it | git branch -u |
||
| Force Push (With Lease)… | ✓ | git push --force-with-lease |
||
| Create Branch Here… | ✓ | ✓ | ✓ | git branch <name> <label> |
| Rename… | ✓ | git branch -m |
||
| Compare with HEAD | ✓ | ✓ | ✓ | git diff <label> HEAD |
| Copy name, Open on GitHub | ✓ (tree/<branch>, when on the remote) |
✓ (origin only) |
✓ (releases/tag/<tag>) |
|
| Delete… | ✓ (dimmed for the current branch) | ✓ |
git branch -d/-D, git tag -d
|
|
| Delete on the remote… | when on the remote | ✓ | ✓ | git push <remote> --delete |
Stash label:
| Item | Git command |
|---|---|
| Apply Stash | git stash apply stash@{n} |
| Pop Stash | git stash pop stash@{n} |
| Show Changes | Lists the stashed files in the details panel (git diff <base> stash@{n}) |
| Create Branch from Stash… | git stash branch <name> stash@{n} |
| Copy Message | |
| Drop Stash… (asks first) | git stash drop stash@{n} |
The toolbar Stash and Pop stay as they are. Patch files are not offered.
These rewrite commits on the current branch with git rebase -i, without opening an editor: cozzle sets cozzle-cli as the sequence editor and the message editor, and it changes only the one line for that commit. Hooks run as usual.
-
Edit Message… and Squash into Parent… open a message box under the toolbar. For a squash it starts with the parent's message, a blank line and this commit's message.
⌘↩or the button runs it. - Drop Commit… asks first.
- They are dimmed, with the reason, while
HEADis detached, for a commit that is not on the current branch, for a merge commit, for squashing the first commit, and while a rebase is stopped. Merge commits between the commit andHEADare refused when you pick the item. - Uncommitted changes are put aside and restored (
--autostash). - If the commit is already on a remote branch, the confirm line or the message box says that you will need to force push.
- If a later commit conflicts, the rebase stops and a line under the toolbar offers Continue (
git rebase --continue, after you resolve and stage the conflicts) and Abort (git rebase --abort).
Names for new branches, tags and renames are typed in a line under the toolbar and checked with git check-ref-format. Names that start with - are refused.
These actions show a line under the toolbar that says what will be lost, and run only when you press the red button:
- Check out a commit (detached HEAD), and any checkout while tracked files have uncommitted changes
- Reset … Hard: uncommitted changes and the commits after the target are lost from the branch
-
Delete… a branch: if it has commits that are not in
HEAD, it is deleted withgit branch -Dand the line says so - Delete on the remote, and deleting a tag
-
Force Push (With Lease)…: runs
git push --force-with-lease. Plain--forceis never used - Drop Commit…, and Drop Stash…
When a merge, rebase, cherry-pick, revert or Pop stops with conflicts, a bar under the toolbar shows the operation, the rebase step (Step 2/5), the number of conflicted files, and what cozzle already resolved.[^conflicts] Its buttons are Continue, Skip (rebase, cherry-pick, revert) and Abort, which asks once more because resolutions so far are lost. It also shows conflicts left by Git commands you ran in a terminal. Before Continue, Skip and Abort (also the rebase line's buttons), cozzle runs git update-index -q --refresh, so files that a formatter or editor rewrote with the same content no longer make Git refuse with not uptodate.
Each conflicted file has a row:
| Button | What it does |
|---|---|
| Open | Opens the file in an editor tab |
| Resolve | Shows each conflict with its Current, Base and Incoming text |
| Accept Current, Accept Incoming, Accept Both | Replaces every conflict in the file. Lines Git already merged stay |
| Accept Incoming and Regenerate | Lock files only (package-lock.json, pnpm-lock.yaml, yarn.lock, Cargo.lock): takes the incoming file and shows the command to run, such as pnpm install. cozzle does not run it |
| Undo Automatic Resolution | Writes the conflicted file again (git checkout --conflict=zdiff3) |
| Mark Resolved |
git add. Refused while conflict markers remain |
| Keep File, Delete File | When one side deleted the file. Delete moves it to the Trash |
Resolve replaces the graph with the file's conflicts. Each one has Accept Current, Accept Incoming, Accept Both, Both, Incoming First and Edit Manually, which opens the editor at that line. File writes keep the line endings and replace the file in one step. When no markers are left, Mark Resolved appears. In a rebase, Current is the branch you rebase onto and Incoming is your commit being replayed.
An editor tab with conflict markers shows a bar with Resolve in Git Graph.
Merges, rebases, cherry-picks, reverts, pulls and Pop started from the graph add these settings for that command only (-c); your Git config does not change:
-
merge.conflictStyle=zdiff3: markers include the common ancestor, and lines both sides share move outside the markers. -
rerere.enabled=trueandrerere.autoUpdate=true: a conflict you resolved once is resolved and staged the same way next time. The bar says how many files were resolved from a previous resolution. -
-X diff-algorithm=histogram(theortdefault, set explicitly).
When Git stops, cozzle resolves a conflict by itself only when the answer is certain: both sides made the same change, one side equals the base, one side changed only trailing spaces or line endings, or the two sides changed different lines. Lines both sides inserted at the same place are left alone, even in a different order. The bar and the file row show how many were resolved.
If mergiraf is on your PATH, Resolve offers Try Syntax-Aware Merge. It shows the result first and applies it only if no conflicts remain. cozzle does not include it.
Type in the search box at the top to see the number of matching commits right away. Each Enter moves to the next match and opens its details. After the last match, it wraps to the first.
The search covers the start of the hash, the subject, the author name, the author email and branch and tag names (case-insensitive).
cozzle downloads each commit author's avatar once, in the background. If it cannot get one, it shows the author's initials on a color that stays the same for that author.
| Author email | Asks | What is sent |
|---|---|---|
Regular email, repository origin on github.com |
GitHub API, then Gravatar | The repository name and commit hashes to GitHub; the MD5 hash of the email address to Gravatar |
| Regular email, other repositories | Gravatar | The MD5 hash of the email address |
<id>+<login>@users.noreply.github.com |
GitHub | The GitHub user ID, already in the address |
<login>@users.noreply.github.com |
GitHub | The GitHub login, already in the address |
cozzle never sends the email address itself and never reads your sign-in token; when gh is installed and signed in, the GitHub lookup goes through gh, so private repositories work too.[^avatar] For a github.com repository, one request reads the latest 100 commits of the default branch; authors not found there are looked up by their latest commit, up to 10 per graph. Downloaded images are kept in ~/.cache/cozzle/avatars-v2 (or $XDG_CACHE_HOME/cozzle/avatars) and are checked again after 7 days. A "no image" answer is remembered for a day; when the network or the GitHub request limit fails, cozzle asks again next time. To see a new photo right away, see FAQ.
Agents read the same history with cozzle git log --limit 20.
[^graph]: src/graph.rs, src/graph_view.rs [^avatar]: src/avatar.rs [^ops]: src/git_ops.rs [^conflicts]: src/conflicts.rs, src/conflict_view.rs
cozzle · MIT License · Repository · Open an issue · Report a vulnerability