Skip to content

Latest commit

 

History

History
36 lines (25 loc) · 1.4 KB

use_git-delta.md

File metadata and controls

36 lines (25 loc) · 1.4 KB

use git-delta

git-delta primarily known as delta (not to be confused with the other delta, a tool to inspect files with code), is alternative diff pager for Git (git), like the popular diff-so-fancy.

I discovered delta from a dev.to post by Mahmoud Ashraf, entitled "My terminal became more Rusty 🦀".

Rust utilities are generally very fast so I though I would give it a spin, but I go so much more than speed and delta can do quite a bit:

  • language syntax highlighting
  • within-line insertion/deletion detection
  • multiple insertion/deletions detected per line
  • matching of unequal numbers of changed lines
  • independently stylable elements
  • line numbering
  • side-by-side view

The above list is copied from the delta documentation.

I .gitconfig has been updated to use delta, it can be found in my dotfiles repository.

If you want to show the diff the default way, you can just instruct git to not use a pager:

$ git --no-pager diff

Resources and References

  1. GitHub: delta
  2. delta
  3. dev.to: "My terminal became more Rusty 🦀" by Mahmoud Ashraf