TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Show HN: GitHub style split diffs in your terminal

178 pointsby milkbikisabout 4 years ago

18 comments

kbdabout 4 years ago
I already use delta for this: <a href="https:&#x2F;&#x2F;github.com&#x2F;dandavison&#x2F;delta" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;dandavison&#x2F;delta</a><p>I thought delta was fairly well-known by now so I was surprised to see this project not mention it (the readme already has a section for that). I wonder what they&#x27;ve chosen to do differently, besides write it in Node.js.
评论 #27009896 未加载
评论 #27012800 未加载
评论 #27010528 未加载
评论 #27010192 未加载
jezabout 4 years ago
When I find myself wanting a split diff in the terminal, I tend to gravitate towards just using Vim’s built in diff mode via vim-fugitive. I even have some git aliases that will open vim and and show fugitive diffs for every file changed on the current branch.<p>The I like this over fancy CLI diff viewers for a handful of reasons:<p>- It re-uses my editor config (no need to fuss with that tools ad hoc config format)<p>- I can navigate the diff with my editor’s navigation tools (expand or hide context lines, open&#x2F;close&#x2F;reorganize tabs, etc.)<p>- My editor’s language-aware tooling kicks in. I can jump to def, reveal types, and find all references while reading the diffs.<p>I wrote more about some of the specific workflows I use in this post, if you’re curious to level up from a CLI-only diff workflow:<p><a href="https:&#x2F;&#x2F;blog.jez.io&#x2F;cli-code-review&#x2F;" rel="nofollow">https:&#x2F;&#x2F;blog.jez.io&#x2F;cli-code-review&#x2F;</a><p>There’s a time and a place for CLI-only diff viewers, and kudos to the author for building a tool they enjoy! I’ve just found that they fit into a sort of uncanny valley of simplicity and power for my needs.
评论 #27012653 未加载
weitzjabout 4 years ago
I enjoy having good terminal ergonomics for Git.<p>What works for me is tig for git diffs.<p>Also very impressive is kitty-diff. If you use kitty as your OpenGL enabled terminal <a href="https:&#x2F;&#x2F;sw.kovidgoyal.net&#x2F;kitty&#x2F;kittens&#x2F;diff.html" rel="nofollow">https:&#x2F;&#x2F;sw.kovidgoyal.net&#x2F;kitty&#x2F;kittens&#x2F;diff.html</a>
评论 #27010207 未加载
busterarmabout 4 years ago
You can just use icdiff to get handsome-looking split diffs in terminal. <a href="https:&#x2F;&#x2F;github.com&#x2F;jeffkaufman&#x2F;icdiff" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;jeffkaufman&#x2F;icdiff</a><p>in your .gitconfig<p><pre><code> [diff] tool = icdiff [difftool] prompt = false [difftool &quot;icdiff&quot;] cmd = &#x2F;usr&#x2F;bin&#x2F;icdiff --line-numbers $LOCAL $REMOTE | less -eFXR </code></pre> then git difftool
seabassabout 4 years ago
This is cool! A bit slow to start up, probably due to starting up a node process each run, but looks great. Wondering if you have a theme that doesn&#x27;t include a background color as I quite like my terminal&#x27;s defaults.
评论 #27010696 未加载
nfozabout 4 years ago
I just use `vimdiff`, but this looks better.
评论 #27010310 未加载
评论 #27010234 未加载
zeckalphaabout 4 years ago
`diff -y` works in a pinch but I generally use icdiff: <a href="https:&#x2F;&#x2F;www.jefftk.com&#x2F;icdiff" rel="nofollow">https:&#x2F;&#x2F;www.jefftk.com&#x2F;icdiff</a>
bovine3domabout 4 years ago
Related but for single pane diffs: <a href="https:&#x2F;&#x2F;github.com&#x2F;so-fancy&#x2F;diff-so-fancy" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;so-fancy&#x2F;diff-so-fancy</a>
vendiddyabout 4 years ago
The diffs look beautiful. One suggestion to the author be to bundle this as a self-contained binary. This would have a huge impact on whether I want to install it.<p>For this, I would look into Deno, which supports self contained binaries with typescript. I&#x27;ve never tried it myself so not sure how much work this would be.
评论 #27029105 未加载
nyellinabout 4 years ago
Is anyone familiar with a good way to programatically create a diff like this as an image?<p>I wrote a small script that tracks changes to your kubernetes cluster and sends a diff of the yaml to Slack. It works but I want to prettify the diff with a GitHub style diff and I need it in image format to send to slack.
评论 #27012384 未加载
nishparadoxabout 4 years ago
I&#x27;ve been using delta: <a href="https:&#x2F;&#x2F;github.com&#x2F;dandavison&#x2F;delta" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;dandavison&#x2F;delta</a><p>It can be easily set up...
gigatexalabout 4 years ago
I’ve been looking for just this!!! Thank you!!
manannayakabout 4 years ago
Nice work, banga!
评论 #27010709 未加载
nickstinematesabout 4 years ago
Looks beautiful
babyabout 4 years ago
This is amazing!
shaicolemanabout 4 years ago
Awesome, thanks!
dikaioabout 4 years ago
Nice work!
AveryEmabout 4 years ago
&gt; 99.1% TypeScript <i>disappointment</i>