git: Add side-by-side diff
Added a simple alteration of diff viewing to also be feasible side-by-side in addition to the default (delta) diff viewing mode. Use aliases `gdd` (and `gdds` for staged) to enable.
This commit is contained in:
parent
13c87f365d
commit
62ec2799c8
2 changed files with 7 additions and 0 deletions
|
@ -26,6 +26,7 @@
|
||||||
fetchall = "!git remote | xargs -I R git fetch R" # fetch from all connected remotes
|
fetchall = "!git remote | xargs -I R git fetch R" # fetch from all connected remotes
|
||||||
diffword = "!git diff --word-diff=color --word-diff-regex='[0-9A-Za-z_]+'" # word-wise diff, good for prose
|
diffword = "!git diff --word-diff=color --word-diff-regex='[0-9A-Za-z_]+'" # word-wise diff, good for prose
|
||||||
diffsyn = "!git difftool --tool difftastic" # add syntax-driven diff using treesitter
|
diffsyn = "!git difftool --tool difftastic" # add syntax-driven diff using treesitter
|
||||||
|
diffside = "!DELTA_FEATURES='+side-by-side' git diff" # add side-by-side diffing
|
||||||
[commit]
|
[commit]
|
||||||
gpgsign = true # sign commits as me
|
gpgsign = true # sign commits as me
|
||||||
verbose = true # Always show diff when preparing commit message
|
verbose = true # Always show diff when preparing commit message
|
||||||
|
|
|
@ -38,6 +38,12 @@ alias gdds='git diffword --staged'
|
||||||
|
|
||||||
alias gi='git ignore'
|
alias gi='git ignore'
|
||||||
|
|
||||||
|
# word-based diff (with custom word regex)
|
||||||
|
alias gdw='git diffword'
|
||||||
|
alias gdws='git diffword --staged'
|
||||||
|
# side-by-side diff
|
||||||
|
alias gdd='git diffside'
|
||||||
|
alias gdds='git diffside --staged'
|
||||||
# syntax-based diff
|
# syntax-based diff
|
||||||
if exist difft; then
|
if exist difft; then
|
||||||
alias gdy='git diffsyn'
|
alias gdy='git diffsyn'
|
||||||
|
|
Loading…
Reference in a new issue