From be3663dabccb3c2539e13b67ff74bf8f7e192002 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sven=20M=C3=A4der?= <maeder@phys.ethz.ch> Date: Thu, 16 Jan 2025 13:36:02 +0100 Subject: [PATCH] Use delta for git diff --- profile/default/.gitconfig | 23 ++++++++++++++++++++++- profile/rda/.gitconfig | 29 ++++++++++++++++++++++++++++- 2 files changed, 50 insertions(+), 2 deletions(-) diff --git a/profile/default/.gitconfig b/profile/default/.gitconfig index 98a5b5e..cd788bd 100644 --- a/profile/default/.gitconfig +++ b/profile/default/.gitconfig @@ -1,7 +1,8 @@ [core] editor = vim excludesfile = ~/.gitignore_global - pager = diff-so-fancy | less --tabs=4 -RFX + pager = LESS='--tabs=4 -RFX' delta + #pager = diff-so-fancy | less --tabs=4 -RFX [color] ui = auto @@ -45,6 +46,22 @@ [difftool] prompt = true +[delta] + navigate = true # use n and N to move between diff sections + dark = true + commit-style = raw + file-style = raw + dark = true + highligh-removed = true + navigate = true + side-by-side = false + plus-style = "syntax #004200" + minus-style = "syntax #420000" + theme = "DarkNeon" + grep-file-style = yellow + grep-line-number-style = orange + grep-match-word-style = red bold + [diff-so-fancy] # Disable green marker at the beginning of new empty lines markEmptyLines = false @@ -110,3 +127,7 @@ adogj = !"git adogv" adog = !"git adogv" adogg = !"git adogv -i --grep" + adogdg = !"git adogd -i --grep" + # no graph: + adoggg = !"git log --all --decorate --oneline --format=format:'%C(#d7ff5f)%h%C(reset)%C(auto)%d%C(reset) %C(normal)%s%C(reset) %C(#5fd7ff)%an%C(reset) %C(#d7d7ff)(%ar)%C(reset)' -G" + adogdgg = !"git log --all --decorate --oneline --date=format:'%Y-%m-%d %H:%M:%S' --format=format:'%C(#d7ff5f)%h%C(reset)%C(auto)%d%C(reset) %C(normal)%s%C(reset) %C(#5fd7ff)%an%C(reset) %C(#d7d7ff)(%ad)%C(reset)' -G" diff --git a/profile/rda/.gitconfig b/profile/rda/.gitconfig index 09c5611..3034820 100644 --- a/profile/rda/.gitconfig +++ b/profile/rda/.gitconfig @@ -1,7 +1,9 @@ [core] editor = vim excludesfile = ~/.gitignore_global - pager = diff-so-fancy | less --tabs=4 -RFX + pager = LESS='--tabs=4 -RFX' delta + #pager = diff-so-fancy | less --tabs=4 -RFX + #pager = delta --diff-so-fancy --syntax-theme="DarkNeon" #pager = delta --dark --plus-color="#004200" --minus-color="#420000" --theme="DarkNeon" --highlight-removed #pager = delta --dark --plus-color="#004d1e" --minus-color="#5e000a" --theme="DarkNeon" --highlight-removed @@ -56,6 +58,22 @@ [difftool] prompt = true +[delta] + navigate = true # use n and N to move between diff sections + dark = true + commit-style = raw + file-style = raw + dark = true + highligh-removed = true + navigate = true + side-by-side = false + plus-style = "syntax #004200" + minus-style = "syntax #420000" + theme = "DarkNeon" + grep-file-style = yellow + grep-line-number-style = orange + grep-match-word-style = red bold + [diff-so-fancy] # Disable green marker at the beginning of new empty lines markEmptyLines = false @@ -84,6 +102,15 @@ # Automatically stash and pop your uncommitted changes while rebasing #autoStash = true +[safe] + #directory = /homenfs/isg/git/passkeeper + #directory = /homenfs/isg/git/passkeeper/.git + #directory = /homenfs/isg/git/digicert.git + +# insecure (used for local submodule clone testing) +#[protocol "file"] +# allow = always + [alias] co = checkout st = status -- GitLab