Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

README.md

git

View git diffs and re-prompt the agent. Invoke with /git.

File selector

This shows your modified files according to git status. You can:

  • select some files and stage a git command with them
  • press d to enter the diff viewer

Commit log

Press l from the modified-file list or the clean-tree prompt to browse the latest 100 commits. The right panel shows the selected commit's added and removed line totals and changed files. Use / to select a commit, d/u to page, g to return to the top, and Enter to view that commit's patch. Escape returns from the patch to the log, then returns to the modified-file list or exits /git from the clean-tree log.

Diff viewer

Quickly page through a diff and tell the agent how dumb it is. Two panes: a diff viewer and a prompt editor.

─────────────────────────────────────────────────────────────────────────────────────────────────────
   Diff (ws hidden) │ extensions/git/README.md│ ▶ Prompt
─────────────────────────────────────────────────────────────────│═══════════════════════════════════
 diff --git a/extensions/git/README.md b/extensions/git/README.md│extensions/git/README.md
 index 98732cf6..bfdc10cd 100644                                 │
 --- a/extensions/git/README.md                                  │Really? No. Try it again.
 +++ b/extensions/git/README.md                                  │
 @@ -11,14 +11,14 @@ This shows your modified files according ...│
                                                                 │
  ## Diff viewer                                                 │
                                                                 │
 -View the diff and use another pane to ask `pi` for changes w...│
 +Quickly page through a diff and tell the agent how dumb it i...│
                                                                 │
  ### Features                                                   │
                                                                 │
 -- hide tests                                                   │
 -- hide certain diffs like `package-lock.json`                  │
 +- option: hide tests                                           │
─────────────────────────────────────────────────────────────────────────────────────────────────────
  enter send · opt+enter follow-up · \+enter newline · tab complete · ↑↓ history · ^C clear · esc ...

Features

  • syntax-highlighted diffs via delta (when installed)
  • option: hide whitespace
  • option: hide tests
  • option: hide files on demand like package-lock.json
  • jump to the next / previous file
  • open the current file at the diff cursor's source line with e
  • move the gutter cursor with /, press v to select lines, then press p to quote them with file line numbers and diff prefixes
  • full prompt editor with auto-completion and history

For example, if PIE_GIT_EDITOR="nvim --remote", pressing e on source line 12 invokes nvim --remote '/absolute/path/to/file:12'.

Recommended: install delta

Install delta for syntax-highlighted diffs. When delta is on your PATH, the diff viewer uses it automatically. Without it, diffs fall back to git's built-in coloring.

Auto-generated commits

The agent will suggest a commit message and you can edit it before committing.

Staged git command

Because adding selected files is difficult on the command line, this feature lets you write a command like git commit {} where {} is replaced with selected files. The command only runs after you press enter.

Installation

This is a pi extension. Run /pie-kumar303-config to install it.