From 0c76c89fabb5c17ae79d3af79547db15e918f016 Mon Sep 17 00:00:00 2001 From: Gabe Venberg Date: Tue, 20 Feb 2024 11:44:09 -0600 Subject: [PATCH] added git config options, support for delta and difftastic. --- README.md | 3 +++ git/.gitconfig | 27 ++++++++++++++++++++++++++- 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 7a8fcfd..107bed8 100644 --- a/README.md +++ b/README.md @@ -104,6 +104,9 @@ uses yazi as a file explorer ### Yazi for accurate mimetype info, I suggest installing `perl-file-mimeinfo` +### Git +For diff tools, install `git-delta` and `difftastic`. I also reccomend installing `lazygit` and/or `tig` + ### Khal and Khard: both require the vdirsyncer program and config. diff --git a/git/.gitconfig b/git/.gitconfig index 80766c4..d2aaca3 100644 --- a/git/.gitconfig +++ b/git/.gitconfig @@ -4,13 +4,38 @@ [alias] hist = log --graph --date-order --date=short --pretty=format:'%C(auto)%h%d %C(reset)%s %C(bold blue)%ce %C(reset)%C(green)%cr (%cd)' graph = log --graph --topo-order --all --pretty=format:'%C(auto)%h %C(cyan)%an %C(blue)%ar %C(auto)%d %s' + recent = branch --sort=-committerdate --format='%(committerdate:relative)%09%(refname:short)' [init] defaultBranch = main [push] autoSetupRemote = true + default = current [difftool] prompt = false [diff] - tool = nvimdiff + ; tool = nvimdiff + tool = difftastic + algorithm = histogram + submodule = log [difftool "nvimdiff"] cmd = "nvim -d \"$LOCAL\" \"$REMOTE\"" +[difftool "difftastic"] + cmd = difft "$LOCAL" "$REMOTE" +[pager] + difftool=true +[pull] + ff = true +[merge] + conflictstyle = zdiff3 +[rebase] + autoSquash = true +[help] + autocorrect = prompt +[core] + pager = delta +[delta] + side-by-side = true +[branch] + sort = -committerdate +[status] + submodulesummary = true