all repos — nixfiles @ 626f20aa5542480cefa4c883a714f788631787e8

System and user configuration, managed by nix and home-manager

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
commit

626f20aa5542480cefa4c883a714f788631787e8

parent

89df9788b274ff0f5b1322cf5bf5b15ea8d3f670

1 files changed, 20 insertions(+), 3 deletions(-)

jump to
M user/settings/git.nixuser/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