tangled
alpha
login
or
join now
cixel.bsky.social
/
config
0
fork
atom
dotfiles files and stuff
0
fork
atom
overview
issues
pulls
pipelines
git: add git config to nix
Ehden Sinai
1 year ago
9b609ac1
2a65e5b2
+65
5 changed files
expand all
collapse all
unified
split
.gitignore
git
config.bak
ignore.bak
home-manager
git.nix
home.nix
+3
.gitignore
···
28
28
github-copilot/
29
29
30
30
result
31
31
+
32
32
+
git/ignore
33
33
+
git/config
git/config
git/config.bak
git/ignore
git/ignore.bak
+61
home-manager/git.nix
···
1
1
+
{}:
2
2
+
{
3
3
+
enable = true;
4
4
+
userName = "cixel";
5
5
+
userEmail = "ehdens@gmail.com";
6
6
+
7
7
+
aliases = {
8
8
+
lg = "log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset'";
9
9
+
aa = "add -A .";
10
10
+
fpush = "push --force-with-lease";
11
11
+
st = "status";
12
12
+
ci = "commit";
13
13
+
co = "checkout";
14
14
+
cp = "cherry-pick";
15
15
+
put = "push origin HEAD";
16
16
+
fixup = "!sh -c 'git commit --no-verify -m \"fixup! $(git log -1 --format='\\''%s'\\'' $@)\"' -";
17
17
+
squash = "!sh -c 'git commit --no-verify -m \"squash! $(git log -1 --format='\\''%s'\\'' $@)\"' -";
18
18
+
doff = "reset head^";
19
19
+
ri = "rebase --interactive";
20
20
+
br = "branch";
21
21
+
pruneremote = "remote prune origin";
22
22
+
tree = "log --graph --oneline --decorate --color --all";
23
23
+
tr = "log --graph --oneline --decorate --color";
24
24
+
unpushed = "!\"PROJ_BRANCH=$(git symbolic-ref HEAD | sed 's|refs/heads/||') && git log origin/$PROJ_BRANCH..HEAD\"";
25
25
+
unpulled = "!\"PROJ_BRANCH=$(git symbolic-ref HEAD | sed 's|refs/heads/||') && git fetch && git log HEAD..origin/$PROJ_BRANCH\"";
26
26
+
add-untracked = "!\"git status --porcelain | awk '/\\?\\?/{ print $2 }' | xargs git add\"";
27
27
+
ln = "log --pretty=format:'%Cblue%h %Cred* %C(yellow)%s'";
28
28
+
reset-authors = "commit --amend --reset-author -CHEAD";
29
29
+
rmbranch = "!f(){ git branch -d \${1} && git push origin --delete \${1}; };f";
30
30
+
snapshot = "!git stash save \"snapshot: $(date)\" && git stash apply \"stash@{0}\" --abbrev-commit --date=relative";
31
31
+
stash = "git stash push";
32
32
+
save = "commit -m \"saving\" --no-verify";
33
33
+
rpull = "pull -r";
34
34
+
};
35
35
+
extraConfig = {
36
36
+
rerere = { enabled = true; };
37
37
+
gc = {
38
38
+
writeCommitGraph = true;
39
39
+
};
40
40
+
pull = {
41
41
+
rebase = true;
42
42
+
};
43
43
+
44
44
+
difftool."vimdiff".cmd = "nvim -d $LOCAL $BASE";
45
45
+
46
46
+
# TODO: move these to work.nix
47
47
+
url."git@github.com:Contrast-Security-Inc/".insteadOf = "https://github.com/Contrast-Security-Inc/";
48
48
+
url."git@bitbucket.org:".insteadOf = "https://bitbucket.org/";
49
49
+
};
50
50
+
ignores = [
51
51
+
".classpath"
52
52
+
".project"
53
53
+
".settings/"
54
54
+
55
55
+
"TODO"
56
56
+
"NOTES"
57
57
+
58
58
+
"gunk/"
59
59
+
"nocommit/"
60
60
+
];
61
61
+
}
+1
home-manager/home.nix
···
81
81
inherit pkgs wsl;
82
82
shell = "${pkgs.zsh}/bin/zsh";
83
83
};
84
84
+
programs.git = import ./git.nix { };
84
85
85
86
programs.atuin = {
86
87
enable = true;