LoginSignup
9

More than 5 years have passed since last update.

Organization

Macでgitからマージツールを使う

長らくMacから簡単に使えるマージツールを探していたのですが、元々インストールしていたXcodeとSourcetreeに入っていたとは・・・。
XcodeかSourcetreeが入っていればopendiffというマージツールが使えます。
設定は以下。

git config --global diff.tool opendiff

使い方

現在のワークスペースでの編集分を確認できます。
git difftool -d

今いるHEADと一つ前のコミットを比較する
git difftool -d HEAD^

任意のブランチ間の差分を比較する
git difftool -d branch1 branch2

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
What you can do with signing up
9