Zurück zum Ranking

so-fancy/diff-so-fancy

Perl

Make your diffs human readable for improved code quality and faster defect detection. :tada:

gitdiffdiff-highlightfancydiffshacktoberfest
Sterne-Wachstum
Sterne
18.1k
Forks
346
Wochenwachstum
Issues
2
5k10k15k
Feb. 2016Juli 2019Jan. 2023Juli 2026
README

🎩 diff-so-fancy Circle CI build AppVeyor build

diff-so-fancy makes your diffs human-readable instead of machine-readable. This helps improve code quality and helps you spot defects faster.

🖼️ Screenshot

Vanilla git diff vs git and diff-so-fancy

diff-highlight vs diff-so-fancy

📦 Install

Simply copy the diff-so-fancy script from the latest Github release into your $PATH and you're done. Alternately to test development features you can clone this repo and then put the diff-so-fancy script (symlink will work) into your $PATH. The lib/ directory will need to be kept relative to the core script.

diff-so-fancy is also available from the NPM registry, brew, Fedora, in the Arch extra repo, and as ppa:aos for Debian/Ubuntu Linux.

Issues relating to packaging ("installation does not work", "version is out of date", etc.) should be directed to those packages' repositories/issue trackers where applicable.

✨ Usage

Git

Configure git to use diff-so-fancy for all diff output:

git config --global core.pager "diff-so-fancy | less --tabs=4 -RF"
git config --global interactive.diffFilter "diff-so-fancy --patch"

Diff

Use -u with diff for unified output, and pipe the output to diff-so-fancy:

diff -u file_a file_b | diff-so-fancy

We also support recursive mode with -r or --recursive

diff --recursive -u /path/folder_a /path/folder_b | diff-so-fancy

⚒️ Options

markEmptyLines

Colorize the first block of an empty line. (Default: true)

git config --bool --global diff-so-fancy.markEmptyLines false

changeHunkIndicators

Simplify Git header chunks to a human readable format. (Default: true)

git config --bool --global diff-so-fancy.changeHunkIndicators false

stripLeadingSymbols

Remove the + or - symbols at start of each diff line. (Default: true)

git config --bool --global diff-so-fancy.stripLeadingSymbols false

useUnicodeRuler

Use Unicode to draw the ruler lines. Setting this to false will use ASCII instead. (Default: true)

git config --bool --global diff-so-fancy.useUnicodeRuler false

rulerWidth

rulerWidth sets the width of the ruler lines. (Default: screen width)

git config --global diff-so-fancy.rulerWidth 80

shortHeaders

Simplify the header information to a single line for filename and line number. (Default false)

git config --global diff-so-fancy.shortHeaders true

semIntegration

Include the summary from sem in the header for each changed file. (Default false)

git config --global diff-so-fancy.semIntegration true

👨 The diff-so-fancy team

Person Role
@scottchiefbaker Project lead
@OJFord Bug triage
@GenieTim Travis OSX fixes
@AOS Debian packager
@Stevemao/@Paul Irish NPM release team

🧬 Contributing

Pull requests are quite welcome, and should target the next branch. We are also looking for any feedback or ideas on how to make diff-so-fancy even fancier.

Other documentation

🔃 Alternatives

🏛️ License

MIT

Ähnliche Repositories
github/gitignore

A collection of useful .gitignore templates

Creative Commons Zero v1.0 Universalgitignoregit
174.9k82.3k
Chalarangelo/30-seconds-of-code

Coding articles to level up your development skills

JavaScriptnpmCreative Commons Attribution 4.0 Internationalawesome-listjavascript
30secondsofcode.org
128.4k12.5k
bregman-arie/devops-exercises

Linux, Jenkins, AWS, SRE, Prometheus, Docker, Python, Ansible, Git, Kubernetes, Terraform, OpenStack, SQL, NoSQL, Azure, GCP, DNS, Elastic, Network, Virtualization. DevOps Interview Questions

PythonPyPIOtherdevopsaws
83.3k19.8k
jesseduffield/lazygit

simple terminal UI for git commands

GoGo ModulesMIT Licensecligit
80.6k2.9k
sharkdp/bat

A cat(1) clone with wings.

Rustcrates.ioApache License 2.0command-linetool
59.8k1.6k
tiimgreen/github-cheat-sheet

A list of cool features of Git and GitHub.

MIT Licenseawesomeawesome-list
git.io/sheet
58k5.4k
go-gitea/gitea

Git with a cup of tea! Painless self-hosted all-in-one software development service, including Git hosting, code review, team collaboration, package registry and CI/CD

GoGo ModulesMIT Licensegiteagolang
gitea.com
56.9k6.9k
gogs/gogs

The painless way to host your own Git service

GoGo ModulesMIT Licensegogsgo
gogs.io
47.7k5.1k
usebruno/bruno

Opensource IDE For Exploring and Testing API's (lightweight alternative to Postman/Insomnia)

JavaScriptnpmMIT Licenseapi-clientgit
usebruno.com
45.8k2.7k
cli/cli

GitHub’s official command line tool

GoGo ModulesMIT Licensegithub-api-v4cli
cli.github.com
45.3k8.7k
files-community/Files

A modern file manager that helps users organize their files and folders.

C#MIT Licensefluent-designxaml
files.community
44.4k2.8k
logseq/logseq

A privacy-first, open-source platform for knowledge management and collaboration. Download link: http://github.com/logseq/logseq/releases. roadmap: https://logseq.io/p/NX4mc_ggEV

ClojureGNU Affero General Public License v3.0knowledge-basegraph
logseq.com
44k2.7k