| 配置 | git config diff.tool <工具名> |
|---|---|
| 用法 | git difftool [--staged] [-d] |
| 适用 | 大改动、需要并排视图时 |
常用示例
常用示例
git config --global diff.tool meld
git difftool
git difftool -d
git difftool --staged逐个文件回车确认的节奏可控,适合逐段消化大型重构。
把差异交给图形化工具逐文件浏览:配置 diff.tool 后执行 git difftool,-d 进入目录比较模式,--staged 比较待提交内容。
| 配置 | git config diff.tool <工具名> |
|---|---|
| 用法 | git difftool [--staged] [-d] |
| 适用 | 大改动、需要并排视图时 |
git config --global diff.tool meld
git difftool
git difftool -d
git difftool --staged