Skip to content

Instantly share code, notes, and snippets.

@dslounge
Last active April 9, 2020 16:29
Show Gist options
  • Save dslounge/fc7d48af3032ca4d0d59695510a39719 to your computer and use it in GitHub Desktop.
Save dslounge/fc7d48af3032ca4d0d59695510a39719 to your computer and use it in GitHub Desktop.
Better git diffs with fzf
# put this in your .bashrc or .zshrc
fd() {
preview="git diff $@ --color=always -- {-1}"
git diff $@ --name-only | fzf -m --ansi --preview $preview
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment