-
Notifications
You must be signed in to change notification settings - Fork 3
/
git.nix
90 lines (86 loc) · 2.5 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
{ pkgs, ... }: {
programs.git = {
enable = true;
ignores = [
".*.~undo-tree~"
"*.~undo-tree~"
".envrc"
"result"
".shell.drv"
".direnv/"
"#*#"
".#*"
".tern-port"
];
userEmail = "michael.fellinger@iohk.io";
userName = "Michael Fellinger";
signing = {
key = "AD58D86AC44000254FE9DD18F4D029589C005F89";
signByDefault = true;
};
extraConfig = {
core = {
pager = "less -R";
autocrlf = "input";
editor = "nvim";
# excludesfile = /home/manveru/.gitignore_global;
};
credential = { helper = "netrc"; };
status = { showUntrackedFiles = "all"; };
transfer = { fsckobjects = false; };
push = { default = "current"; };
pull = { default = "current"; };
color = { ui = true; };
merge = {
ff = "only";
conflictstyle = "diff3";
summary = true;
tool = "vimdiff";
};
branch = { autoSetupMerge = "always"; };
instaweb = { port = 1234; };
ui = { color = true; };
rebase = {
stat = true;
autoSquash = true;
autostash = true;
};
# diff = { tool = "icdiff"; };
# difftool = { prompt = false; };
# "difftool \"icdiff\"" = {
# cmd = "${pkgs.icdiff}/bin/icdiff --line-numbers $LOCAL $REMOTE";
# };
stash = { showPatch = true; };
};
aliases = {
st = "status";
di = "diff";
ci = "commit";
br = "branch";
sta = "stash";
co = "checkout";
cd = "checkout";
cb = "checkout -b";
rbom = "rebase -i origin/master";
rbc = "rebase --continue";
amend = "commit --amend";
stat = "status -s";
unadd = "rm --cached";
dlog = "log --decorate";
# glog =
# "log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset'";
# slog = ''
# log --pretty=format:"%C(auto,yellow)%h%C(auto)%d\\ %C(auto,reset)%s\\ \\ [%C(auto,blue)%cn%C(auto,reset),\\ %C(auto,cyan)%ar%C(auto,reset)]"'';
# addprx = ''
# !f() { b=`git symbolic-ref -q --short HEAD` && \
# git fetch origin pull/$1/head:pr/$1 && \
# git fetch -f origin pull/$1/merge:PR_MERGE_HEAD && \
# git rebase --onto $b PR_MERGE_HEAD^ pr/$1 && \
# git branch -D PR_MERGE_HEAD && \
# git checkout $b && echo && \
# git diff --stat $b..pr/$1 && echo && \
# git slog $b..pr/$1; }; f
# '';
};
};
}