Improved Git Diffs with Delta, Fzf and a Little Shell Scripting

(nickjanetakis.com)

31 points | by nickjj 4 days ago

5 comments

  • linsomniac 2 hours ago
    I had been using delta for around a year and liked it, but still found some of the diffs I was looking a bit hard to read. A few weeks ago after a discussion on HN I tried difftastic, and have become a fan. You might want to consider it if you go down this rabbit hole. https://difftastic.wilfred.me.uk/
    • TJTorola 8 minutes ago
      Came here to say this, difftastic is great as long as you are working in a language where it understands the language tree (most languages). Getting away from diffs being focused on line changes to diffs that understand the actual language makes so much sense once you start to use it.
  • diath 11 minutes ago
    I had to give up on diff-so-fancy because it would break a lot when used with `git diff --patch` but this post just reminded me of the issue and it turns out that it has recently been fixed, so I may give it another go.

    https://github.com/so-fancy/diff-so-fancy/issues/498

  • baumy 1 hour ago
    As someone who's used vim + a shell as my IDE since the start of my time using computers, it's been really awesome (and occasional eye-roll inducing...) watching people discover all these tools now that claude code is sending them into the terminal.

    A lot of posts like this are making it to the front page of HN now that new people are exploring this world for the first time. That's great, the more the merrier, but gets a bit frustrating when a post title is written as if it's discovered some new awesome development tool or methodology, and it's just something people have been doing for years or even decades. This post isn't that big of an offender, but I'm thinking more of stuff like this [0] that it reminded me of.

    I should try to be less grumpy about it, but I hope people also try to recognize how often these "new" tools they've been discovering have been routinely used long before LLMs. Maybe I'm just hitting my get-off-my-lawn stage, but it's a bit jarring to come to hacker news and see upvoted posts that are just "look, I can color the diffs in my terminal!". I'm glad this person discovered it, but I thought that was table stakes for the community here.

    [0] https://x.com/dani_avila7/article/2023151176758268349

    • MeetingsBrowser 1 hour ago
      Having used both terminal and GUI based development environments, the good GUI environments blow terminal based workflows out of the water.

      There are pros and cons to each. Vim can do some neat things, but GUI based IDEs are generally useful and easier to use out of the box for development.

      The terminal tools are getting popular because people don’t need to do development. Claude is doing the development task. People just need to quickly review code in terminal.

      • rileymat2 18 minutes ago
        > but GUI based IDEs are generally useful and easier to use out of the box for development.

        This is true, they are much better for discovery and affordance, but as you progress with your tooling and tool usage there is a much higher ceiling on your productivity with other tools and their composability. In my opinion, not putting effort into learning tools ultimately holds a lot of people back from their potential.

      • baumy 4 minutes ago
        I completely disagree. Terminal workflows are superior in a number of ways. Most important to me are that they are more composable and more customizable. The learning curve is tougher, but the "skill ceiling" on them is higher. The ease and speed with which somebody comfortable in their terminal based environment will navigate through the tasks they need to do will always exceed what is even possible in a GUI.

        I would say that GUIs are superior for a few specific use cases, but otherwise sub par. Step through debugging comes to mind as a good GUI use case, but even that I'm not sure if it's because a GUI is inherently better, or making a terminal based debugger is harder and so nobody has made a good one yet.

      • backscratches 12 minutes ago
        Lol terminal is better for everything except maybe the one case you mentioned: first time use feature discovery, and that's debatable
        • rileymat2 5 minutes ago
          That seems a little harsh. GUI tools can give us a more vibrant and useful interface.

          But, I think the main problem is that although there have been many attempts we have not gotten to a standard way to compose different GUI tools easily or repeat actions.

      • ab71e5 34 minutes ago
        Why would you say GUI based workflows are better (ignoring LLMs for now)? I would maybe give you debugging with breakpoints but for anything else I love my neovim with tmux setup
  • jeninho 10 minutes ago
    [dead]