1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

GitExtensions, SourceTreeでVisualStudioをDiffツールに使用する

Posted at

VisualStudioにGitSourceControlProviderをインストールし、ツリーからdiffを見るためにGitExtensionsを設定してみたが、そのままでは違うエディタが開いてしまう。エディタが違うとソースがパッと頭に入ってこないのでVisualStudioのdiffが出るようにします。

GitExtentionのdiffツールの設定

設定 -> グローバル設定 -> マージツール & Diffツール -> vsdiffmergeを選択

2018-10-02_15h25_30.png

マージツール

"C:/Program Files (x86)/Microsoft Visual Studio 11.0/Common7/IDE/vsDiffMerge.exe" /m "$REMOTE" "$LOCAL" "$BASE" "$MERGED"

Diffツール

"C:/Program Files (x86)/Microsoft Visual Studio 11.0/Common7/IDE/vsDiffMerge.exe" "$LOCAL" "$REMOTE"

またここでファイルのエンコードを変更すると、FileHistoryの画面のDiffの画面でSHIFT-JISになり、文字化けを最初から回避できます。

2018-10-02_15h27_38.png

SourceTreeのdiffツールの設定

ツール -> オプション -> Diff -> カスタムを選択

C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\devenv.exe
-Diff $LOCAL $REMOTE

VisualStudioからdiffを起動

2018-10-02_15h16_51.png

2018-10-02_15h43_19.png

いいですね。diffとソースエディタのスタイルが同じ方が見やすいです。

1
1
0

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
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?