Interactive Git command wrapper using fzf for visual selection of files, commits, branches, and other Git objects
forgit is a Git wrapper that adds interactive selection to standard Git commands using fzf as the fuzzy finder. It provides shell aliases like ga for interactive git add, glo for browsing commit history, and gcb for branch switching, all with visual previews and multi-select capabilities.
The tool covers the full Git workflow with 25+ commands including file staging (ga), diff viewing (gd), branch management (gcb, gsw, gbd), commit operations (gco, grc, gcp), stash handling (gss, gsp), and advanced workflows like interactive rebasing (grb) and fixup commits (gfu). Each command opens an fzf interface showing relevant Git objects with previews and allows selection through keyboard navigation.
forgit supports Bash, Zsh, and Fish shells and can be installed through package managers or shell plugin managers. It integrates with Git's existing configuration for pagers and can be customized through environment variables to modify both Git arguments and fzf options for each command. The tool requires fzf 0.60.0 or higher and can also function as a Git subcommand when added to PATH.
# via Homebrew
brew install forgit
# via Fisher (Fish)
fisher install wfxr/forgit
# via Oh My Zsh
git clone https://github.com/wfxr/forgit.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/forgit


