Unverified Commit 255ef8d5 authored by Tvrtko Majstorović's avatar Tvrtko Majstorović Committed by GitHub
Browse files

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

parent 10538d11
...@@ -62,6 +62,7 @@ plugins=(... git) ...@@ -62,6 +62,7 @@ plugins=(... git)
| gdct | git describe --tags $(git rev-list --tags --max-count=1) | | gdct | git describe --tags $(git rev-list --tags --max-count=1) |
| gds | git diff --staged | | gds | git diff --staged |
| gdt | git diff-tree --no-commit-id --name-only -r | | gdt | git diff-tree --no-commit-id --name-only -r |
| gdnolock | git diff $@ ":(exclude)package-lock.json" ":(exclude)*.lock" |
| gdv | git diff -w $@ \| view - | | gdv | git diff -w $@ \| view - |
| gdw | git diff --word-diff | | gdw | git diff --word-diff |
| gf | git fetch | | gf | git fetch |
......
...@@ -86,6 +86,11 @@ alias gds='git diff --staged' ...@@ -86,6 +86,11 @@ alias gds='git diff --staged'
alias gdt='git diff-tree --no-commit-id --name-only -r' alias gdt='git diff-tree --no-commit-id --name-only -r'
alias gdw='git diff --word-diff' 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 - } function gdv() { git diff -w "$@" | view - }
compdef _git gdv=git-diff compdef _git gdv=git-diff
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment