aboutsummaryrefslogtreecommitdiff
path: root/files/.gitconfig
diff options
context:
space:
mode:
authorAnton Bobov <abobov@gmail.com>2020-11-15 23:47:09 +0500
committerAnton Bobov <abobov@gmail.com>2020-11-15 23:47:09 +0500
commit44ba2818d52570a12f8314bcf17a660f5ed2b00c (patch)
tree906608d3a424b555ada529ff6c55c2d79c572d96 /files/.gitconfig
parent004c3891b1433053bb30444f34fc5cad28ab2ce3 (diff)
Git: add diff-so-fancy as default diff.
Diffstat (limited to 'files/.gitconfig')
-rw-r--r--files/.gitconfig21
1 files changed, 18 insertions, 3 deletions
diff --git a/files/.gitconfig b/files/.gitconfig
index ce37bc4..81df095 100644
--- a/files/.gitconfig
+++ b/files/.gitconfig
@@ -3,12 +3,25 @@
email = abobov@gmail.com
[http]
sslVerify = false
-[color]
- ui = auto
+[color "diff-highlight"]
+ oldNormal = red bold
+ oldHighlight = red bold reverse
+ newNormal = "#009900" bold
+ newHighlight = "#009900" bold reverse
+[color "diff"]
+ meta = 11
+ frag = magenta bold
+ commit = yellow bold
+ old = red bold
+ new = green bold
+ whitespace = red reverse
[diff]
tool = vimdiff
[difftool]
prompt = false
+[diff-so-fancy]
+ stripLeadingSymbols = false
+ markEmptyLines = false
[grep]
lineNumber = true
[merge]
@@ -16,7 +29,7 @@
stat = true
tool = vimdiff
[core]
- pager = less -+$LESS -FRX
+ pager = diff-so-fancy | less -+$LESS -FRX
excludesfile = ~/.gitignore
quotepath = false
[log]
@@ -29,6 +42,8 @@
co = checkout
ci = commit
diffstat = diff --stat -r
+ dc = diff --find-copies-harder --cached
+ di = diff --find-copies-harder
fix = commit --amend -C HEAD
history-all = "!gitk --all $( git fsck | awk '/dangling commit/ {print $3}'; git log -g --pretty='format:%H')"
k = !sh -c 'gitk $1' -