Last active
December 6, 2024 12:52
-
-
Save dslounge/fc7d48af3032ca4d0d59695510a39719 to your computer and use it in GitHub Desktop.
Better git diffs with fzf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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