在推送之前审查和优化 Git 差异
Review and refine Git diffs before you push.
brew install difigo install github.com/xguot/difi/cmd/difi@latestBinary (pre-built):
pikaur -S difi-binBuild from source:
pikaur -S difi$PATH.Run difi in any Git repository against main:
cd my-project
difiTo compare against a specific branch or commit, just pass it as an argument:
# Compare against the main branch
difi main
# Compare against the previous commit
difi HEAD~1You 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
git config --global alias.difi '!difi'Now you can run it directly from git:
git difi暂无开放 Issues,或尚未同步最近议题。