{"id":13395188,"url":"https://github.com/dandavison/delta","last_synced_at":"2025-05-12T18:21:39.361Z","repository":{"id":37545205,"uuid":"193526915","full_name":"dandavison/delta","owner":"dandavison","description":"A syntax-highlighting pager for git, diff, grep, and blame output","archived":false,"fork":false,"pushed_at":"2025-05-02T15:41:04.000Z","size":11109,"stargazers_count":26062,"open_issues_count":318,"forks_count":416,"subscribers_count":85,"default_branch":"main","last_synced_at":"2025-05-05T15:50:04.946Z","etag":null,"topics":["color-themes","delta","diff","git","git-delta","pager","rust","syntax-highlighter"],"latest_commit_sha":null,"homepage":"https://dandavison.github.io/delta/","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dandavison.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2019-06-24T15:00:13.000Z","updated_at":"2025-05-05T15:46:27.000Z","dependencies_parsed_at":"2023-11-18T16:26:45.773Z","dependency_job_id":"664f6afa-c46c-4fa9-8f43-d8eb9fe94cd3","html_url":"https://github.com/dandavison/delta","commit_stats":{"total_commits":1845,"total_committers":115,"mean_commits":"16.043478260869566","dds":"0.19674796747967482","last_synced_commit":"7d9bfd308a8bff537f3d49677e1b3b586b5a5fe6"},"previous_names":[],"tags_count":64,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dandavison%2Fdelta","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dandavison%2Fdelta/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dandavison%2Fdelta/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dandavison%2Fdelta/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dandavison","download_url":"https://codeload.github.com/dandavison/delta/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253795213,"owners_count":21965499,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["color-themes","delta","diff","git","git-delta","pager","rust","syntax-highlighter"],"created_at":"2024-07-30T17:01:45.578Z","updated_at":"2025-05-12T18:21:39.324Z","avatar_url":"https://github.com/dandavison.png","language":"Rust","readme":"\u003cp align=\"center\"\u003e\n  \u003cimg width=400px src=\"https://user-images.githubusercontent.com/52205/147996902-9829bd3f-cd33-466e-833e-49a6f3ebd623.png\" alt=\"image\" /\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/dandavison/delta/actions\"\u003e\n    \u003cimg src=\"https://github.com/dandavison/delta/workflows/Continuous%20Integration/badge.svg\" alt=\"CI\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://coveralls.io/github/dandavison/delta?branch=main\"\u003e\n    \u003cimg src=\"https://coveralls.io/repos/github/dandavison/delta/badge.svg?branch=main\" alt=\"Coverage Status\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://gitter.im/dandavison-delta/community?utm_source=badge\u0026amp;utm_medium=badge\u0026amp;utm_campaign=pr-badge\"\u003e\n    \u003cimg src=\"https://badges.gitter.im/dandavison-delta/community.svg\" alt=\"Gitter\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n## Get Started\n\n[Install it](https://dandavison.github.io/delta/installation.html) (the package is called \"git-delta\" in most package managers, but the executable is just `delta`) and add this to your `~/.gitconfig`:\n\n```gitconfig\n[core]\n    pager = delta\n\n[interactive]\n    diffFilter = delta --color-only\n\n[delta]\n    navigate = true  # use n and N to move between diff sections\n    dark = true      # or light = true, or omit for auto-detection\n\n[merge]\n    conflictstyle = zdiff3\n```\n\nOr run:\n\n```sh\ngit config --global core.pager delta\ngit config --global interactive.diffFilter 'delta --color-only'\ngit config --global delta.navigate true\ngit config --global merge.conflictStyle zdiff3\n```\n\nDelta has many features and is very customizable; please see `delta -h` (short help) or `delta --help` (full manual), or the [online user manual](https://dandavison.github.io/delta/).\n\n## Features\n\n- Language syntax highlighting with the same syntax-highlighting themes as [bat](https://github.com/sharkdp/bat#readme)\n- Word-level diff highlighting using a Levenshtein edit inference algorithm\n- Side-by-side view with line-wrapping\n- Line numbering\n- `n` and `N` keybindings to move between files in large diffs, and between diffs in `log -p` views (`--navigate`)\n- Improved merge conflict display\n- Improved `git blame` display (syntax highlighting; `--hyperlinks` formats commits as links to hosting provider etc. Supported hosting providers are: GitHub, GitLab, SourceHut, Codeberg)\n- Syntax-highlights grep output from `rg`, `git grep`, `grep`, etc\n- Support for Git's `--color-moved` feature.\n- Code can be copied directly from the diff (`-/+` markers are removed by default).\n- `diff-highlight` and `diff-so-fancy` emulation modes\n- Commit hashes can be formatted as terminal [hyperlinks](https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda) to the hosting provider page (`--hyperlinks`).\n  File paths can also be formatted as hyperlinks for opening in your OS.\n- Stylable box/line decorations to draw attention to commit, file and hunk header sections.\n- Style strings (foreground color, background color, font attributes) are supported for \u003e20 stylable elements, using the same color/style language as git\n- Handles traditional unified diff output in addition to git output\n- Automatic detection of light/dark terminal background\n\n## A syntax-highlighting pager for git, diff, and grep output\n\nCode evolves, and we all spend time studying diffs. Delta aims to make this both efficient and enjoyable: it allows you to make extensive changes to the layout and styling of diffs, as well as allowing you to stay arbitrarily close to the default git/diff output.\n\n\u003ctable align=\"center\"\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\n      \u003cimg width=400px src=\"https://user-images.githubusercontent.com/52205/86275526-76792100-bba1-11ea-9e78-6be9baa80b29.png\" alt=\"image\" /\u003e\n      \u003cbr\u003e\n      \u003cp align=\"center\"\u003e\u003csub\u003edelta with \u003ccode\u003eline-numbers\u003c/code\u003e activated\u003c/sub\u003e\u003c/p\u003e\n    \u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n\u003ctable align=\"center\"\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\n      \u003cimg width=800px src=\"https://user-images.githubusercontent.com/52205/87230973-412eb900-c381-11ea-8aec-cc200290bd1b.png\" alt=\"image\" /\u003e\n      \u003cbr\u003e\n      \u003cp align=\"center\"\u003e\u003csub\u003edelta with \u003ccode\u003eside-by-side\u003c/code\u003e and \u003ccode\u003eline-numbers\u003c/code\u003e activated\u003c/sub\u003e\u003c/p\u003e\n    \u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\nHere's what `git show` can look like with git configured to use delta:\n\n\u003cbr\u003e\n\n\u003ctable align=\"center\"\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\n      \u003cimg width=500px style=\"border: 1px solid black\"\n           src=\"https://user-images.githubusercontent.com/52205/81058545-a5725f80-8e9c-11ea-912e-d21954586a44.png\"\n           alt=\"image\" /\u003e\n    \u003c/td\u003e\n    \u003ctd\u003e\n      \u003cimg width=500px style=\"border: 1px solid black\"\n           src=\"https://user-images.githubusercontent.com/52205/81058911-6abcf700-8e9d-11ea-93be-e212824ec03d.png\"\n           alt=\"image\" /\u003e\n    \u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\n      \"Dracula\" theme\n    \u003c/td\u003e\n    \u003ctd\u003e\n      \"GitHub\" theme\n    \u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n\u003cbr\u003e\n\u003cbr\u003e\n\n### Syntax-highlighting themes\n\n**All the syntax-highlighting color themes that are available with [bat](https://github.com/sharkdp/bat/) are available with delta:**\n\n\u003cbr\u003e\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\n      \u003cimg width=400px style=\"border: 1px solid black\"\n           src=\"https://user-images.githubusercontent.com/52205/149431273-e3ad049d-771e-4186-869d-0e57967958a6.png\"\n           alt=\"image\" /\u003e\n    \u003c/td\u003e\n    \u003ctd\u003e\n      \u003cimg width=400px style=\"border: 1px solid black\"\n           src=\"https://user-images.githubusercontent.com/52205/149431419-48836001-2afc-4fd0-97ad-561a69b71db7.png\"\n           alt=\"image\" /\u003e\n    \u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\n      \u003ccode\u003edelta --show-syntax-themes --dark\u003c/code\u003e\n    \u003c/td\u003e\n    \u003ctd\u003e\n      \u003ccode\u003edelta --show-syntax-themes --light\u003c/code\u003e\n    \u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n\u003cbr\u003e\n\n### Side-by-side view\n\n[[User manual](https://dandavison.github.io/delta/side-by-side-view.html)]\n\n```gitconfig\n[delta]\n    side-by-side = true\n```\n\nBy default, side-by-side view has line-numbers activated, and has syntax highlighting in both the left and right panels: [[config](#side-by-side-view-1)]\n\n\u003ctable\u003e\u003ctr\u003e\u003ctd\u003e\u003cimg width=800px src=\"https://user-images.githubusercontent.com/52205/87230973-412eb900-c381-11ea-8aec-cc200290bd1b.png\" alt=\"image\" /\u003e\u003c/td\u003e\u003c/tr\u003e\u003c/table\u003e\n\nSide-by-side view wraps long lines automatically:\n\n\u003ctable\u003e\u003ctr\u003e\u003ctd\u003e\u003cimg width=600px src=\"https://user-images.githubusercontent.com/52205/139064537-f8479504-16d3-429a-b4f6-d0122438adaa.png\" alt=\"image\" /\u003e\u003c/td\u003e\u003c/tr\u003e\u003c/table\u003e\n\n### Line numbers\n\n[[User manual](https://dandavison.github.io/delta/line-numbers.html)]\n\n```gitconfig\n[delta]\n    line-numbers = true\n```\n\n\u003ctable\u003e\u003ctr\u003e\u003ctd\u003e\u003cimg width=400px src=\"https://user-images.githubusercontent.com/52205/86275526-76792100-bba1-11ea-9e78-6be9baa80b29.png\" alt=\"image\" /\u003e\u003c/td\u003e\u003c/tr\u003e\u003c/table\u003e\n\n### Merge conflicts\n\n[[User manual](https://dandavison.github.io/delta/merge-conflicts.html)]\n\n\u003ctable\u003e\u003ctr\u003e\u003ctd\u003e\u003cimg width=500px src=\"https://user-images.githubusercontent.com/52205/144783121-bb549100-69d8-41b8-ac62-1704f1f7b43e.png\" alt=\"image\" /\u003e\u003c/td\u003e\u003c/tr\u003e\u003c/table\u003e\n\n### Git blame\n\n[[User manual](https://dandavison.github.io/delta/git-blame.html)]\n\n\u003ctable\u003e\u003ctr\u003e\u003ctd\u003e\u003cimg width=600px src=\"https://user-images.githubusercontent.com/52205/141891376-1fdb87dc-1d9c-4ad6-9d72-eeb19a8aeb0b.png\" alt=\"image\" /\u003e\u003c/td\u003e\u003c/tr\u003e\u003c/table\u003e\n\n### Ripgrep, git grep\n\n[[User manual](https://dandavison.github.io/delta/grep.html)]\n\n\u003ctable\u003e\u003ctr\u003e\u003ctd\u003e\n\u003cimg width=\"600px\" alt=\"image\" src=\"https://github.com/dandavison/open-in-editor/assets/52205/d203d380-5acb-4296-aeb9-e38c73d6c27f\"\u003e\n\u003c/td\u003e\u003c/tr\u003e\u003c/table\u003e\n\n### Installation and usage\n\nPlease see the [user manual](https://dandavison.github.io/delta/) and `delta --help`.\n\n### Maintainers\n\n- [@dandavison](https://github.com/dandavison)\n- [@th1000s](https://github.com/th1000s)\n","funding_links":[],"categories":["Rust","HarmonyOS","语言资源库","Programming.","Git","Dev-Utilities","工具和库","CSS","Table of Contents","Other","其他","git","Tools","rust","\u003ca name=\"git\"\u003e\u003c/a\u003egit","Ecosystem \u0026 Community","\u003ca name=\"diff\"\u003e\u003c/a\u003eDiff","Source Code","System \u0026 Command","Command line - Linux","Development tools","Applications"],"sub_categories":["Windows Manager","rust","Git Tools","Snippets Manager","网络服务_其他","Rust","Themes","Terminal Utilities","Developer Tools","Diff Enhancers","Other","Learning resources","Workflow Automation","System tools"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdandavison%2Fdelta","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdandavison%2Fdelta","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdandavison%2Fdelta/lists"}