Why not login to Qiita and try out its useful features?

We'll deliver articles that match you.

You can read useful information later.

3
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 1 year has passed since last update.

git diff をgithubみたいに見やすくしたい人へ (左右画面分割diff , 差分ハイライト

Posted at

こんな感じにおしゃれに。
image.png

https://github.com/dandavison/delta
これ使う。

インストールはこちらのリンクから
https://dandavison.github.io/delta/installation.html

インストールが終わったら、 ~/.gitconfig に設定を入れる。

自分の設定は

~/.gitconfig
# github.com/dandavison/delta
[core]
    pager = delta

[delta]
    side-by-side = true
    features = unobtrusive-line-numbers decorations
    whitespace-error-style = 22 reverse

[delta "unobtrusive-line-numbers"]
    line-numbers = true
    line-numbers-left-format = "{nm:>4}┊"
    line-numbers-right-format = "{np:>4}│"
    line-numbers-left-style = blue
    line-numbers-right-style = blue

[delta "decorations"]
    commit-decoration-style =  box ul
    file-style = bold yellow ul
    file-decoration-style = none
    hunk-header-decoration-style = cyan box ul

好きなようにカスタマイズしてみてください。

3
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

Comments

No comments

Let's comment your feelings that are more than good

3
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?