Skip to content

Instantly share code, notes, and snippets.

@ChiftKey
Forked from gmolveau/diff-so-fancy-install.sh
Last active June 28, 2021 20:48
Show Gist options
  • Save ChiftKey/0dd414eb0b06452432eac29286a830ae to your computer and use it in GitHub Desktop.
Save ChiftKey/0dd414eb0b06452432eac29286a830ae to your computer and use it in GitHub Desktop.
ubuntu/debian diff-so-fancy install
# choose a folder that is in your PATH or create a new one
mkdir -p ~/.bin
# clone the source code to local path
git clone https://github.com/so-fancy/diff-so-fancy ~/.bin/diffsofancy_src
# make the script executable
chmod +x ~/.bin/diffsofancy_src/diff-so-fancy
ln -s ~/.bin/diffsofancy_src/diff-so-fancy ~/.bin/diff-so-fancy
# add ~/.bin to your PATH (.bashrc or .zshrc)
# by text editor (vim or ...)
vi ~/.bashrc or vi ~/.zshrc
# or use echo command
echo "PATH=\$PATH:~/.bin/" >> ~/.zshrc
# accept the environment
source ~/.zshrc
# add git configuration related to diff-so-fancy
git config --global core.pager "diff-so-fancy | less --tabs=4 -RFX"
git config --global interactive.diffFilter "diff-so-fancy --patch"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment