Skip to content

Press 1 to open the working tree. tab switches between the two panes.

small   ⎇ main                                                                  
╭──────────────────────────────────────────────────╮╭──────────────────────────╮
 Diff — logo.png (worktree)                        Files (10) +8 −10        
────────────────────────────────────────────────────────────────────────────
binary file — no textual diff                     Tracked                   
                                                   M logo.png               
                                                  D  main.go           +0 −3
                                                   M noeol.txt         +1 −1
                                                   M plain.txt         +1 −1
                                                   M spaced name.txt   +2 −2
                                                  A  staged.txt        +1 −0
                                                   M two-hunks.txt     +2 −2
                                                   M ünïcødé-ファイル+1 −1
                                                  Untracked                 
                                                  ?? main.go                
                                                  ?? untracked.txt          
                                                                            
                                                                            
                                                                            
                                                                            
                                                                            
                                                                            
╰──────────────────────────────────────────────────╯╰──────────────────────────╯
space stage  t staged  c commit  C amend  A stage all  U unstage all  ? help    

The right pane lists changed files under two headings, Tracked and Untracked. The headings are labels, not rows: the cursor steps over them.

Each file carries git’s two-letter status — the first letter the staged column, the second the unstaged column, ?? for an untracked file — and, where git can count them, the lines the change adds and removes. The pane title carries the file count and the totals for the tree.

The left pane shows the diff of the selected file, syntax highlighted. The pane title says whether you are looking at the worktree side or the staged side. Press t to toggle between them.

A binary file has no diff to show. The pane says binary file — no textual diff instead.

space stages what is under the cursor and a stages the hunk around it. In the file list both mean the whole file; the difference between them only exists inside the diff.

A and U stage and unstage the whole tree, D and X throw changes away, and s, S and p work the stash. See Staging and committing for the full set of keys.

The view keeps itself current. It re-reads when a file in the working tree changes, and every ten seconds regardless, so a git command run in another terminal shows up without asking. R re-reads it now.

A view you are not looking at is marked stale rather than re-read, and the document pane stays on screen while its own diff reloads, so nothing blinks while you read it.