DEV Community

r_tanaka
r_tanaka

Posted on • Edited on

2

How to use terminal to make git diff beautiful

Hi, terminal folks!

There is the word diff feature in git.
Let's activate it now!

First, my git version is this.

$ git version
git version 2.21.0

It is essential to make a diff-highlight binary file.
Then move it to executable path or create a symbolic link for same purpose.
However, initial state of the binary is different depends on each linuxs.
there are 3 patterns as far as I know.

  1. a binary exists with an executable permission
  2. a binary exists with a not-executable permission
  3. there is a make file instead of a binary

I write just for option#3. If your initial state is #1 or #2, please make sure it works by reading below. I guess you can do it.

cd /usr/share/doc/git/contrib/diff-highlight/
sudo make
sudo ln -s /usr/share/doc/git/contrib/diff-highlight/diff-highlight /usr/local/bin/diff-highlight
sudo chmod +x /usr/share/doc/git/contrib/diff-highlight/diff-highlight

At last, edit your ~/.gitconfig file

[core]
    pager = diff-highlight | less -r

Image of AssemblyAI tool

Transforming Interviews into Publishable Stories with AssemblyAI

Insightview is a modern web application that streamlines the interview workflow for journalists. By leveraging AssemblyAI's LeMUR and Universal-2 technology, it transforms raw interview recordings into structured, actionable content, dramatically reducing the time from recording to publication.

Key Features:
🎥 Audio/video file upload with real-time preview
🗣️ Advanced transcription with speaker identification
⭐ Automatic highlight extraction of key moments
✍️ AI-powered article draft generation
📤 Export interview's subtitles in VTT format

Read full post

Top comments (0)

AWS Security LIVE!

Tune in for AWS Security LIVE!

Join AWS Security LIVE! for expert insights and actionable tips to protect your organization and keep security teams prepared.

Learn More

👋 Kindness is contagious

Discover a treasure trove of wisdom within this insightful piece, highly respected in the nurturing DEV Community enviroment. Developers, whether novice or expert, are encouraged to participate and add to our shared knowledge basin.

A simple "thank you" can illuminate someone's day. Express your appreciation in the comments section!

On DEV, sharing ideas smoothens our journey and strengthens our community ties. Learn something useful? Offering a quick thanks to the author is deeply appreciated.

Okay