Git 連携
WinXMerge は Git の difftool と mergetool の両方として連携できます。
difftool の設定
Section titled “difftool の設定”# ビルドとインストールcargo build --release --features desktopcp target/release/winxmerge ~/.local/bin/
# git の設定git config --global diff.tool winxmergegit config --global difftool.winxmerge.cmd 'winxmerge "$LOCAL" "$REMOTE"'git config --global difftool.prompt falsemergetool の設定(3-Way マージ)
Section titled “mergetool の設定(3-Way マージ)”git config --global merge.tool winxmergegit config --global mergetool.winxmerge.cmd 'winxmerge "$BASE" "$LOCAL" "$REMOTE"'git config --global mergetool.winxmerge.trustExitCode true# ワーキングツリーの変更を表示git difftool
# 特定のファイルの差分git difftool -- path/to/file.rs
# ブランチ間の差分git difftool main..feature-branch
# マージコンフリクトの解決git mergetoolシングルインスタンスタブモード
Section titled “シングルインスタンスタブモード”git difftool が複数の変更ファイルを処理する際、WinXMerge は IPC(Unix ドメインソケット)を使用して実行中のインスタンスを検出します。複数のウィンドウを開く代わりに、以降の差分は既存ウィンドウの新しいタブとして開かれます。
2つ以上のファイルペアがこの方法で開かれると、仮想フォルダ比較ビューとして表示されます。フォルダビュー内のファイルをダブルクリックすると、新しいタブで詳細な差分が開きます。
この動作は自動的に行われ、追加の設定は不要です。