chore(git): add aliases and rework configuration
This commit is contained in:
parent
3361cc31b1
commit
31d15e6416
1 changed files with 24 additions and 0 deletions
|
@ -22,9 +22,33 @@ in
|
|||
config = mkIf cfg.enable {
|
||||
programs.git = {
|
||||
enable = true;
|
||||
delta = {
|
||||
enable = true;
|
||||
options = {
|
||||
dark = true;
|
||||
line-numbers = true;
|
||||
syntax-theme = "base16-256";
|
||||
|
||||
};
|
||||
};
|
||||
package = pkgs.gitFull;
|
||||
userName = "${cfg.userName}";
|
||||
userEmail = "${cfg.userEmail}";
|
||||
aliases = {
|
||||
fa = "fetch --all";
|
||||
far = "!git fa; git rebase";
|
||||
l = "log --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit";
|
||||
lg = "log --graph --decorate --pretty=oneline --abbrev-commit";
|
||||
pf = "push --force-with-lease";
|
||||
rewrite = "!git commit --amend --no-edit && git push --force-with-lease";
|
||||
st = "status -sb";
|
||||
};
|
||||
extraConfig = {
|
||||
push = {
|
||||
autoSetupRemote = true;
|
||||
default = "current";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue