From e37074b54b0771f0dd667eaa673083b67e8375a2 Mon Sep 17 00:00:00 2001 From: exu Date: Thu, 6 Mar 2025 09:23:08 +0100 Subject: [PATCH] Add a bunch of new git options --- roles/config/files/.config/git/config | 36 +++++++++++++++++++-------- 1 file changed, 25 insertions(+), 11 deletions(-) diff --git a/roles/config/files/.config/git/config b/roles/config/files/.config/git/config index 9c8ae332..1a9d766c 100755 --- a/roles/config/files/.config/git/config +++ b/roles/config/files/.config/git/config @@ -7,18 +7,32 @@ defaultBranch = main # Some popular options to test: # https://jvns.ca/blog/2024/02/16/popular-git-config-options/#merge-conflictstyle-zdiff3 -#[merge] -# conflictstyle = zdiff3 +# https://blog.gitbutler.com/how-git-core-devs-configure-git/ +[merge] + conflictstyle = zdiff3 # 3way merge conflict. current change, original, incoming change [diff] - algorithm = histogram -#[branch] -# sort = -committerdate -#[tag] -# sort = taggerdate -# [gitlab] -# user = exu -# [github] -# user = exu + algorithm = histogram # better handling of code movement + colorMoved = plain # different color for moved code + mnemonicPrefix = true # diff prefix i (index), w (working dir) or c (commit) instead of a and b + renames = true # better renames detection +[branch] + sort = -committerdate # sort by date of last commit +[tag] + sort = taggerdate # sort by creation date + # sort = version:refname # sorting by version numbers +[push] + autoSetupRemote = true # automatically set upstream branch + followTags = true # always push local tags +[pull] + rebase = true # auto rebase local commits +[fetch] + prune = true # remove local leftovers on fetch + pruneTags = true # remove local tags on fetch + all = true # fetch all +[commit] + verbose = true # show detailed changes +[help] + autocorrect = prompt # if I ever need to use the CLI [alias] # use like this: git mr [REPO] [MERGE REQUEST] # see https://stackoverflow.com/a/50834005 (GitLab)