{ lib, userEmail, ... }: { home.activation.removeExistingGitconfig = lib.hm.dag.entryBefore ["checkLinkTargets"] '' rm -f ~/.gitconfig ''; programs.git = { enable = true; userName = "Wyatt J. Miller"; userEmail = userEmail; extraConfig = { init.defaultBranch = "master"; push.autoSetupRemote = true; pull.rebase = true; }; ignores = [ ".DS_Store" ".direnv" ".idea" ]; aliases = { # common aliases a = "add"; ap = "add -p"; br = "branch"; co = "checkout"; st = "status -sb"; status = "status -sb"; ls = "log --pretty=format:\"%C(yellow)%h%Cred%d\\\\ %Creset%s%Cblue\\\\ [%cn]\" --decorate"; ll = "log --pretty=format:\"%C(yellow)%h%Cred%d\\\\ %Creset%s%Cblue\\\\ [%cn]\" --decorate --numstat"; cm = "commit -m"; ca = "commit -am"; dc = "diff --cached"; amend = "commit --amend -m"; # aliases for submodule update = "submodule update --init --recursive"; foreach = "submodule foreach"; }; }; }