LoginSignup
1
1

More than 3 years have passed since last update.

Debianでgit diff-highlightを使う

Posted at

環境

  • Debian 10
  • Git
    • apt-get install gitでインストール済み

手順

※基本的には、参考サイトの手順と同じです。

diff-highlightディレクトリに移動します。
ディレクトリ内にMakefileがあるので、makeコマンドを叩いてdiff-highlightバイナリを生成します。

$ cd /usr/share/doc/git/contrib/diff-highlight
$ sudo make

次に、/usr/local/bin/diff-highlightに対して、シンボリックリンクを貼ります。

$ sudo ln -s /usr/share/doc/git/contrib/diff-highlight/diff-highlight /usr/local/bin/diff-highlight

~/.gitconfigを編集し、以下を追加します。

[pager]
    log = diff-highlight | less
    show = diff-highlight | less
    diff = diff-highlight | less

tigでも同様にハイライトできるようにするには、
~/.tigrcを編集し、以下を追加します。

set diff-highlight = true

参考

gitのdiff-highlightを使い始めた - りんごとバナナとエンジニア

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