Last active
March 9, 2025 08:49
-
-
Save furnox/663efaa3633832465beac664748778d0 to your computer and use it in GitHub Desktop.
Includes new files along with git diff
This file contains hidden or 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
#!/bin/bash | |
if [ "$#" -eq 0 ]; then | |
( git diff --staged --color=always; git diff --color=always; git ls-files --others --exclude-standard | while read -r i; do if [[ -f $i ]]; then git diff --color=always -- /dev/null "$i"; fi; done ) | less -r | |
else | |
git diff "$@" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment