git: add some recommended configuration settings https://blog.gitbutler.com/how-git-core-devs-configure-git/
Alan Pearce alan@alanpearce.eu
Tue, 25 Feb 2025 19:08:47 +0100
1 files changed, 20 insertions(+), 3 deletions(-)
jump to
M user/settings/git.nix → user/settings/git.nix
@@ -34,12 +34,15 @@ }; core = { commitGraph = true; }; + commit = { + verbose = true; + }; pull = { rebase = true; }; fetch = { prune = true; - prunetags = true; + pruneTags = true; }; push = { default = "current"; @@ -47,21 +50,34 @@ autoSetupRemote = true; followTags = true; }; rebase = { + autostash = true; autosquash = true; updateRefs = true; }; rerere = { enabled = true; + autoupdate = true; }; merge = { - conflictStyle = "diff3"; + conflictStyle = "zdiff3"; }; diff = { algorithm = "histogram"; - colorMoved = "default"; + colorMoved = "plain"; + mnemonicPrefix = true; + renames = true; + }; + grep = { + patternType = "perl"; }; remote = { autoSetupMerge = true; + }; + branch = { + sort = "committerdate"; + }; + tag = { + sort = "version:refname"; }; "branch.master" = { rebase = false; @@ -127,6 +143,7 @@ home.packages = with pkgs; [ git-extras # delete-merged-branches and friends git-worktree-switcher ghq + # reduce these on server delta gitui gitstatus