Files
dot/nix/user/git.nix
Martin Pander f9ebfc652f Fix git lg
2024-10-22 12:06:09 +02:00

38 lines
823 B
Nix

{ config, pkgs, ... }:
{
programs.git = {
enable = true;
aliases = {
st = "status";
ci = "commit";
co = "checkout";
br = "branch";
pl = "pull";
ps = "push";
sw = "switch";
mno =" merge --no-ff";
lg = "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%C(bold blue)<%an>%Creset' --abbrev-commit";
cleanup = "!git fetch --prune && git branch -vv | grep ': gone]' | awk '{print $1}' | xargs git branch -D";
};
difftastic.enable = true;
extraConfig = {
core = {
editor = "nvim";
};
push.default = "matching";
init.defaultBranch = "main";
merge.conflicstyle = "zdiff3";
fetch.prune = true;
};
ignores = [
".direnv/"
".envrc"
];
};
}