From ca03244de8211df2939adce146bcb72db58fa7f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jalil=20David=20Salam=C3=A9=20Messina?= Date: Thu, 8 Feb 2024 20:18:34 +0100 Subject: [PATCH] feat(git): Extra options Saw some cool git options thanks to @b0rk@jvns.ca so I added them c: --- home/default.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/home/default.nix b/home/default.nix index c167090..ccaae87 100644 --- a/home/default.nix +++ b/home/default.nix @@ -39,7 +39,14 @@ in programs.git.difftastic.background = "dark"; programs.git.lfs.enable = true; programs.git.extraConfig.init.defaultBranch = "main"; + # Better conflicts (also shows parent commit state) programs.git.extraConfig.merge.conflictStyle = "zdiff3"; + # Do not create merge commits when pulling (rebase but abort on conflict) + programs.git.extraConfig.pull.ff = "only"; + # Use `--set-upstream` if the remote does not have the branch + programs.git.extraConfig.push.autoSetupRemote = true; + # If there are uncommitted changes, stash them before rebasing + programs.git.extraConfig.rebase.autoStash = true; programs.lazygit.enable = true; # Mail client programs.himalaya.enable = true;