about summary refs log tree commit diff
path: root/modules/common/git.nix
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--modules/common/git.nix35
1 files changed, 26 insertions, 9 deletions
diff --git a/modules/common/git.nix b/modules/common/git.nix
index de401fb..da33eb2 100644
--- a/modules/common/git.nix
+++ b/modules/common/git.nix
@@ -59,17 +59,31 @@ in {
 
           extraConfig =
             {
-              advice.detachedHead = false;
               color.ui = true;
               core.whitespace = "trailing-space";
+              init.defaultBranch = "master";
+              status.submoduleSummary = true;
+              commit.verbose = 1;
+              push.autoSetupRemote = true;
+              pull.rebase = true;
+              rebase = {
+                autoStash = true;
+                autoSquash = true;
+              };
               diff = {
                 mnemonicPrefix = true;
                 renames = "copies";
                 submodule = "log";
               };
-              init.defaultBranch = "master";
-              push.autoSetupRemote = true;
-              status.submoduleSummary = true;
+              submodule.recurse = true;
+              sendemail = rec {
+                smtpServer = my.domain.shire;
+                smtpUser = "${my.username}@${smtpServer}";
+                smtpEncryption = "ssl";
+                smtpServerPort = 465;
+                annotate = true;
+                confirm = "always";
+              };
               github.user = my.username;
               gitlab.user = my.username;
             }
@@ -95,10 +109,14 @@ in {
             git = "${config.hm.programs.git.package}/bin/git";
             curl = "${pkgs.curl}/bin/curl";
           in {
-            fuck = "!${git} reset --hard && ${git} clean -fdx";
+            amend = "commit --amend";
+            cat = "cat-file -p";
+            fast = "clone --depth=1";
+            fixup = "commit --fixup";
+            fuck = "!${git} reset --hard && ${git} clean --force -dx";
+            get = "pull --all --recurse-submodules --autostash";
             gud = ''commit -m "git gud"'';
-            review = "!${git} lg @{push}..";
-            reword = "commit --amend";
+            refresh = "clean --force -X";
             tree = "log --graph --date=relative --pretty=tformat:'%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%an %ad)%Creset'";
             uncommit = "reset --soft HEAD~1";
             untrack = "rm --cache --";
@@ -106,8 +124,7 @@ in {
           };
 
           # All helper tools/editor generated files should go here. This must be
-          # kept relatively clean and void of any project-specific residual
-          # files.
+          # kept void of any project-specific or residual files.
           ignores = [
             "*~"
             ".DS_Store"

Consider giving Nix/NixOS a try! <3