generated from ryantm/home-manager-template
-
Notifications
You must be signed in to change notification settings - Fork 1
/
git.nix
42 lines (41 loc) · 1.08 KB
/
git.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
{ pkgs, ... }:
{
programs = {
git = {
enable = true;
aliases = {
unstage = "reset HEAD --";
pr = "pull --rebase";
co = "checkout";
ci = "commit";
c = "commit";
b = "branch";
p = "push";
d = "diff";
a = "add";
s = "status";
f = "fetch";
br = "branch";
lr = "reflog";
l = "log --graph --pretty='%Cred%h%Creset - %C(bold blue)<%an>%Creset %s%C(yellow)%d%Creset %Cgreen(%cr)' --abbrev-commit --date=relative";
hist = "log --branches --remotes --decorate --graph --pretty=format:'%C(auto) %>|(15) %h %d %<|(30trunc) %s %>|(100)%C(cyan)%ci %C(yellow)%an %C(cyan)(%ar)'";
h = "hist";
};
ignores = [
".DS_Store"
".com.apple.backupd*"
".project"
".settings"
"*~"
"*.swp"
];
extraConfig = {
core.quotepath = true;
merge.conflictstyle = "diff3";
pull.rebase = true;
status.showUntrackedFiles = "all";
init.defaultBranch = "main";
};
};
};
}