wfxr / forgit
:zzz: A utility tool powered by fzf for using git interactively.
AI Architecture Analysis
This repository is indexed by RepoMind. By analyzing wfxr/forgit in our AI interface, you can instantly generate complete architecture diagrams, visualize control flows, and perform automated security audits across the entire codebase.
Our Agentic Context Augmented Generation (Agentic CAG) engine loads full source files into context on-demand, avoiding the fragmentation of traditional RAG systems. Ask questions about the architecture, dependencies, or specific features to see it in action.
Repository Overview (README excerpt)
Crawler view💤 forgit Utility tool for using git interactively. Powered by junegunn/fzf . This tool is designed to help you use git more efficiently. It's **lightweight** and **easy to use**. 📝 Features ------------ ** ** - Interactive selector: ** ** - Interactive viewer: ** ** - Interactive generator: Full Command List | Command | Description | |----------|-------------| | | Interactive selector | | | Interactive viewer | | | Interactive generator | | | Interactive viewer | | | Interactive generator | | | Interactive viewer | | | Interactive selector | | | Interactive selector | | | Interactive selector | | | Interactive selector | | | Interactive selector | | | Interactive selector | | | Interactive selector | | | Interactive selector | | | Interactive selector | | | Interactive viewer | | | Interactive selector | | | Interactive selector | | | Interactive selector | | | Interactive viewer | | | Interactive selector | | | Interactive selector | | | Interactive selector | | | Interactive selector | | | Interactive selector | | | Interactive selector | | | Interactive selector | | | Interactive selector | 📥 Installation ---------------- Requirements • version or higher If your OS package manager bundles an older version of , you might install it using 's own install script. Shell Package Managers Homebrew To install using brew Then add the following to your shell's config file: Arch User Repository AUR packages, maintained by the developers of forgit, are available. Install the forgit package for the latest release or forgit-git to stay up to date with the latest commits from the default branch of this repository. Completions Forgit offers completions for all supported shells. Completions are automatically configured when installing forgit through Homebrew or the AUR. All other installation methods mentioned above require manual setup for completions. The necessary steps depend on the shell you use. Bash • Put in to have bash tab completion for and configured git aliases. • Source explicitly to have bash tab completion for forgit shell functions and aliases (e.g., completes branches). Fish • Put in to have fish tab completion for and configured git aliases, as well as shell command aliases, such as . Zsh • Put in a directory in your (e.g., ) to have zsh tab completion for and configured git aliases, as well as shell command aliases, such as and . If you're having issues after updating, and commands such as or aliases aren't working, remove your completions cache and restart your shell. 🚀 Usage --------- Shell Aliases You can change the default aliases by defining these variables below before sourcing the forgit shell plugin. (To disable all aliases, Set the flag.) Git Integration You can use forgit as a sub-command of git by making available in : *Some plugin managers can help do this.* Then, any forgit command will be a sub-command of git: Optionally you can add aliases in git: And use forgit functions via a git alias: ⚙ Configuration ----------------- Options can be set via environment variables. They have to be **exported** in order to be recognized by . For instance, if you want to order branches in by the last committed date you could: Per-command Options Each forgit command can be customized with dedicated environment variables for git arguments and fzf options: | Command | Git Options | FZF Options | |----------|-------------|-------------| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pagers Forgit will use the default configured pager from git ( , , ) but can be altered with the following environment variables: | Pager | Fallbacks to | |---------------------------|--------------------------------------------------| | | _or_ | | | _or_ | | | _or_ | | | _or_ | | | _or_ | | | _or_ | | | Normal pager resolution * | • If your pager is a TUI program (e.g., , ), fzf preview panes will be blank because they run without a TTY. Set to a non-interactive pager (e.g., ) to fix this. When set, it overrides all other settings in fzf preview context. FZF Options You can add default fzf options for , including keybindings, layout, etc. (No need to repeat the options already defined in ) Per-command fzf options ( ) are listed in the per-command options table above. Complete loading order of fzf options is: • (fzf global) • (forgit global) • (command specific) Examples: • to drop the selected stash but do not quit fzf ( specific). • to view the logs in a vim buffer ( specific). Other Options | Option | Description | Default | |--------------------------------|--------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------| | | git log format | | | | override log format for command | | | | enable log graph display | | | | command for copying to clipboard | | | | lines of diff context in preview mode | 3 | | | lines of diff context in full-screen mode | 10 | | | command used to preview directories | if available, otherwise | | | arguments passed to together with to determine which files are shown when invoking | | | | directory where new worktrees are created | | ⌨ Keybindings --------------- | Key | Action | | :-------------------------------------------: | ------------------------------------------- | | Enter | Confirm | | Tab | Toggle mark and move down | | Shift - Tab | Toggle mark and move up | | ? | Toggle preview window | | Alt - W | Toggle preview wrap | | Ctrl - S | Toggle sort | | Ctrl - R | Toggle selection | | Ctrl - Y | Copy commit hash/stash ID/worktree path 1 | | Ctrl - K / P | Selection move up | | Ctrl - J / N | Selection move down | | Alt - K / P | Preview move up | | Alt - J / N | Preview move down | | Alt - E | Open file in default editor (when pos…