Marcin Biegała

2 minuty czytania

I’m a ‘console guy’. I usually prefer any type of console/text based interface over sweet and colorful UI. Same applies to my favorite source control - GIT. But there is nothing that prevents us to get fancy in our terminals. Meet diff-so-fancy.
GIT is great for handling your code, showing repository log in any way you want, but when it comes to showing a diff, we’re basicly stuck with the standard patch format.
Don’t get me wrong, it’s very informative, but sometimes dealing with all those +++ and — makes things more complicated.
Below you can see a screenshot take from projects website: We get nice asci art like headers for file names, no more +/- characters to mess our code and even changed part of lines highlighted.
It’s not the best thing since sliced bread for sure, but definetly it’s a nice touch to your every day git life :)
So how do we get this ?
I will just show you how to get this easiest on mac, but you can find instalation instructions for other OS on the projects github page.
We will use brew to install the package:

brew install diff-so-fancy

Now we can use it inside our repositories

git diff --color | diff-so-fancy

You can of course plug it into GIT configuration, again examples are on projects github page

Zapisz się do newslettera

Poza nowościami z bloga, staram się podsyłać także ciekawe artykuły z sieci, czy informacje o fajnych wydarzeniach.
Sam nie lubię spamu, więc z reguły nie dostaniesz ode mnie maila częściej niż raz na tydzień/dwa.

comments powered by Disqus