mirror of
https://github.com/davegallant/nix-config
synced 2025-08-07 13:22:28 +00:00
nix: nixify gitconfig
This commit is contained in:
@@ -37,14 +37,70 @@
|
||||
'';
|
||||
};
|
||||
|
||||
|
||||
git = {
|
||||
enable = true;
|
||||
|
||||
aliases = {
|
||||
"aa" = "add -A .";
|
||||
"br" = "branch";
|
||||
"ca" = "commit -S --amend";
|
||||
"cb" = "checkout -b";
|
||||
"ci" = "commit";
|
||||
"cm" = "commit -m";
|
||||
"co" = "checkout";
|
||||
"cs" = "commit -S";
|
||||
"csm" = "commit -S -m";
|
||||
"csa" = "commit -S --amend";
|
||||
"deleted" = "log --diff-filter=D --summary";
|
||||
"di" = "diff";
|
||||
"dic" = "diff --cached";
|
||||
"dicn" = "diff --cached --name-only";
|
||||
"din" = "diff --name-only";
|
||||
"l" = "log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit";
|
||||
"ms" = "merge --squash";
|
||||
"pb" = "pull --rebase";
|
||||
"po" = "push origin";
|
||||
"por" = "push origin HEAD:refs/for/$1";
|
||||
"st" = "status";
|
||||
"wip" = "for-each-ref --sort='authordate:iso8601' --format=' %(color:green)%(authordate:relative)%09%(color:white)%(refname:short)' refs/heads";
|
||||
};
|
||||
|
||||
includes = [
|
||||
{ path = "~/.gitconfig-work"; }
|
||||
];
|
||||
|
||||
delta = {
|
||||
enable = true;
|
||||
|
||||
options = {
|
||||
features = "line-numbers decorations";
|
||||
whitespace-error-style = "22 reverse";
|
||||
plus-style = "green bold ul '#198214'";
|
||||
decorations = {
|
||||
commit-decoration-style = "bold yellow box ul";
|
||||
file-style = "bold yellow ul";
|
||||
file-decoration-style = "none";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
extraConfig = ''
|
||||
[push]
|
||||
default = current
|
||||
[pull]
|
||||
rebase = true
|
||||
'';
|
||||
};
|
||||
|
||||
zsh = {
|
||||
enable = true;
|
||||
enableAutosuggestions = true;
|
||||
history.size = 1000000;
|
||||
|
||||
localVariables = {
|
||||
CASE_SENSITIVE="true";
|
||||
DISABLE_UNTRACKED_FILES_DIRTY="true";
|
||||
CASE_SENSITIVE = "true";
|
||||
DISABLE_UNTRACKED_FILES_DIRTY = "true";
|
||||
ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE = "fg=#838383,underline";
|
||||
ZSH_DISABLE_COMPFIX = "true";
|
||||
};
|
||||
|
66
.gitconfig
66
.gitconfig
@@ -1,66 +0,0 @@
|
||||
[include]
|
||||
path = ~/.gitconfig-work
|
||||
|
||||
[alias]
|
||||
aa = add -A .
|
||||
br = branch
|
||||
ca = commit -S --amend
|
||||
cb = checkout -b
|
||||
ci = commit
|
||||
cm = commit -m
|
||||
co = checkout
|
||||
cs = commit -S
|
||||
csm = commit -S -m
|
||||
csa = commit -S --amend
|
||||
deleted = log --diff-filter=D --summary
|
||||
di = diff
|
||||
dic = diff --cached
|
||||
dicn = diff --cached --name-only
|
||||
din = diff --name-only
|
||||
l = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
|
||||
ms = merge --squash
|
||||
pb = pull --rebase
|
||||
po = push origin
|
||||
por = push origin HEAD:refs/for/$1
|
||||
st = status
|
||||
wip = for-each-ref --sort='authordate:iso8601' --format=' %(color:green)%(authordate:relative)%09%(color:white)%(refname:short)' refs/heads
|
||||
|
||||
[color]
|
||||
diff = auto
|
||||
status = auto
|
||||
branch = auto
|
||||
|
||||
[core]
|
||||
editor = vim
|
||||
pager = delta
|
||||
|
||||
[push]
|
||||
default = current
|
||||
|
||||
[pull]
|
||||
rebase = true
|
||||
|
||||
[filter "lfs"]
|
||||
clean = git-lfs clean -- %f
|
||||
smudge = git-lfs smudge -- %f
|
||||
required = true
|
||||
process = git-lfs filter-process
|
||||
|
||||
[commit]
|
||||
gpgsign = true
|
||||
|
||||
[gpg]
|
||||
program = gpg
|
||||
|
||||
[interactive]
|
||||
diffFilter = delta --color-only
|
||||
|
||||
[delta]
|
||||
features = line-numbers decorations
|
||||
whitespace-error-style = 22 reverse
|
||||
plus-style = green bold ul "#198214"
|
||||
|
||||
[delta "decorations"]
|
||||
commit-decoration-style = bold yellow box ul
|
||||
file-style = bold yellow ul
|
||||
file-decoration-style = none
|
Reference in New Issue
Block a user