From a80d9e8a8492d671582dc919102ac60d5413bb4c Mon Sep 17 00:00:00 2001 From: Minijackson Date: Tue, 25 Feb 2025 12:06:07 +0100 Subject: common/git: better configuration --- common/commandline/git.nix | 33 ++++++++++++++++++++++++++++++--- 1 file changed, 30 insertions(+), 3 deletions(-) (limited to 'common/commandline/git.nix') diff --git a/common/commandline/git.nix b/common/commandline/git.nix index 05785ed..397a76c 100644 --- a/common/commandline/git.nix +++ b/common/commandline/git.nix @@ -31,7 +31,11 @@ _inputs: deltaCommand = "${pkgs.gitAndTools.delta}/bin/delta"; in { - init.defaultBranch = "master"; + init.defaultBranch = "main"; + + column.ui = "auto"; + branch.sort = "-committerdate"; + tag.sort = "version:refname"; color = { branch = { @@ -59,11 +63,34 @@ _inputs: algorithm = "histogram"; colormoved = "default"; colorMovedWS = "allow-indentation-change"; + mnemonicPrefix = true; }; - pull.ff = "only"; + fetch = { + all = true; + prune = true; + pruneTags = true; + }; + pull = { + ff = "only"; + rebase = true; + }; + push = { + default = "simple"; + autoSetupRemote = true; + }; - rerere.enable = true; + help.autocorrect = "prompt"; + + rebase = { + autoSquash = true; + autoStash = true; + updateRefs = true; + }; + rerere = { + enable = true; + autoUpdate = true; + }; merge = { conflictStyle = "zdiff3"; -- cgit v1.2.3