git-delta

This commit is contained in:
Georgi Gardev
2024-07-11 16:10:06 +03:00
parent 88e8bd7aa0
commit 40ab935354
2 changed files with 24 additions and 9 deletions
+23 -9
View File
@@ -1,6 +1,26 @@
# local user config, usernames, etc
[include]
path=~/.config/.gitconfig.local
### git-delta
[core]
pager = delta
[interactive]
diffFilter = delta --color-only
[delta]
navigate = true # use n and N to move between diff sections
true-color = always
hyperlinks = true
hyperlinks-file-link-format = "vscode://file/{path}:{line}"
# side-by-side = true # alterantively use git -c delta.side-by-side=true diff
[delta "side-by-side"]
side-by-side = true
[merge]
conflictstyle = diff3
[diff]
colorMoved = default
### end git-delta
[color]
diff = auto
status = auto
@@ -8,24 +28,17 @@
interactive = auto
ui = auto
[help]
# Automatically correct and execute mistyped commands.
autocorrect = 1
autocorrect = 1 # Automatically correct and execute mistyped commands.
[branch]
# Show most recently changed branches first.
sort = -committerdate
sort = -committerdate # Show most recently changed branches first.
[push]
default = simple
autoSetupRemote = true
[diff]
tool = default-difftool
[difftool "default-difftool"]
cmd = code --wait --diff $LOCAL $REMOTE
[filter "media"]
clean = git media clean %f
smudge = git media smudge %f
required = true
[alias]
# Shorten some often used commands
b = branch
c = commit
sw = switch
@@ -45,6 +58,7 @@
squash = rebase --autostash -i
megasquash = "!f() { git rebase --autostash -i `git merge-base --fork-point HEAD master`; }; f"
unstage = restore --staged
# fzf commands
cf="!checkout_fzf() { git branch | fzf-tmux -p -h 25% --header 'git checkout' | xargs git checkout; }; checkout_fzf"
sf="!switch_fzf() { git branch | fzf-tmux -p -h 25% --header 'git switch' | xargs git switch; }; switch_fzf"