git: add alias for git diff excluding lock files (#8935)

This commit is contained in:
Tvrtko Majstorović 2020-05-23 18:57:13 +02:00 committed by GitHub
commit 255ef8d587
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 0 deletions

View file

@ -86,6 +86,11 @@ alias gds='git diff --staged'
alias gdt='git diff-tree --no-commit-id --name-only -r'
alias gdw='git diff --word-diff'
function gdnolock() {
git diff "$@" ":(exclude)package-lock.json" ":(exclude)*.lock"
}
compdef _git gdnolock=git-diff
function gdv() { git diff -w "$@" | view - }
compdef _git gdv=git-diff