百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
D

difi

> 开发工具
开源

在推送之前审查和优化 Git 差异

357 stars0 点赞1 次浏览
访问官网GitHub

工具介绍

在推送之前审查和优化 Git 差异

Review and refine Git diffs before you push.

Installation

Homebrew (macOS & Linux)

bash
brew install difi

Go Install

bash
go install github.com/xguot/difi/cmd/difi@latest

AUR (Arch Linux)

Binary (pre-built):

bash
pikaur -S difi-bin

Build from source:

bash
pikaur -S difi

Manual (Linux / Windows)

  • Download the binary from Releases and add it to your $PATH.

Workflow

Run difi in any Git repository against main:

bash
cd my-project
difi

To compare against a specific branch or commit, just pass it as an argument:

bash
# Compare against the main branch
difi main

# Compare against the previous commit
difi HEAD~1

Piping & Alternative VCS

You can also pass raw diffs directly into difi via standard input. This is perfect for patch files or other version control systems like Jujutsu:

…

yaml ui: theme: "dracula"


## Integrations

#### vim-fugitive

- **The "Unix philosophy" approach:** Uses the industry-standard Git wrapper to provide a robust, side-by-side editing experience.
- **Side-by-Side Editing:** Instantly opens a vertical split (:Gvdiffsplit!) against the index.
- **Merge Conflicts:** Automatically detects conflicts and opens a 3-way merge view for resolution.
- **Config**: Add the line below to if using **lazy.nvim**.

```lua
{
  "tpope/vim-fugitive",
  cmd = { "Gvdiffsplit", "Git" }, -- Add this line
}

…

bash
bash
git config --global alias.difi '!difi'

Now you can run it directly from git:

bash
git difi

Contributors

  • Abraham Joy (@abraham-1672) - Logo and Wordmark Design

Star History

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Gobubbleteagit

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类开发工具
定价开源

> 相关工具

V
VS Code
流行的开源代码编辑器
G
Git
分布式版本控制系统
V
Vite
下一代前端构建工具