idk some stuff, mostly 25.11 and opencode stuff
This commit is contained in:
@@ -12,11 +12,14 @@
|
||||
unstable.git-spice
|
||||
];
|
||||
|
||||
# Delta (git diff pager) - moved to top-level in home-manager 25.11
|
||||
programs.delta = {
|
||||
enable = true;
|
||||
enableGitIntegration = true;
|
||||
};
|
||||
|
||||
programs.git = {
|
||||
enable = true;
|
||||
userName = "Anish Lakhwara";
|
||||
userEmail = "anish+git@lakhwara.com";
|
||||
delta.enable = true;
|
||||
signing = {
|
||||
signByDefault = if pkgs.stdenv.isLinux then false else true;
|
||||
key = if pkgs.stdenv.isLinux then "B8492C8FB53397B7" else "7FC5DF072EF7B716";
|
||||
@@ -60,51 +63,55 @@
|
||||
"node_modules/"
|
||||
];
|
||||
|
||||
extraConfig = {
|
||||
# 25.11: extraConfig, userName, userEmail, aliases moved under settings
|
||||
settings = {
|
||||
user = {
|
||||
name = "Anish Lakhwara";
|
||||
email = "anish+git@lakhwara.com";
|
||||
};
|
||||
pull.rebase = false;
|
||||
push.autoSetupRemote = true;
|
||||
init.defaultBranch = "main";
|
||||
"url \"git@github.com:\"" = { insteadOf = "https://github.com/"; };
|
||||
};
|
||||
"url \"git@github.com:\"" = {
|
||||
insteadOf = "https://github.com/";
|
||||
};
|
||||
|
||||
aliases = {
|
||||
a = "add -p";
|
||||
co = "checkout";
|
||||
cob = "checkout -b";
|
||||
f = "fetch -p";
|
||||
c = "commit -v";
|
||||
p = "push";
|
||||
ba = "branch -a";
|
||||
bd = "branch -d";
|
||||
bD = "branch -D";
|
||||
d = "diff";
|
||||
dc = "diff --cached";
|
||||
ds = "diff --staged";
|
||||
r = "restore";
|
||||
rs = "restore --staged";
|
||||
st = "status -sb";
|
||||
alias = {
|
||||
a = "add -p";
|
||||
co = "checkout";
|
||||
cob = "checkout -b";
|
||||
f = "fetch -p";
|
||||
c = "commit -v";
|
||||
p = "push";
|
||||
ba = "branch -a";
|
||||
bd = "branch -d";
|
||||
bD = "branch -D";
|
||||
d = "diff";
|
||||
dc = "diff --cached";
|
||||
ds = "diff --staged";
|
||||
r = "restore";
|
||||
rs = "restore --staged";
|
||||
st = "status -sb";
|
||||
|
||||
# reset
|
||||
soft = "reset --soft";
|
||||
hard = "reset --hard";
|
||||
s1ft = "soft HEAD~1";
|
||||
h1rd = "hard HEAD~1";
|
||||
# reset
|
||||
soft = "reset --soft";
|
||||
hard = "reset --hard";
|
||||
s1ft = "soft HEAD~1";
|
||||
h1rd = "hard HEAD~1";
|
||||
|
||||
# logging
|
||||
lg =
|
||||
"log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit";
|
||||
plog =
|
||||
"log --graph --pretty='format:%C(red)%d%C(reset) %C(yellow)%h%C(reset) %ar %C(green)%aN%C(reset) %s'";
|
||||
tlog =
|
||||
"log --stat --since='1 Day Ago' --graph --pretty=oneline --abbrev-commit --date=relative";
|
||||
rank = "shortlog -sn --no-merges";
|
||||
authors = "authors | sort | uniq -c | sort -n";
|
||||
ls = "log --graph --abbrev-commit --decorate --color=always --date=relative --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) - %C(dim red)%an%C(reset)%C(bold yellow)%d%C(reset)' --all";
|
||||
# logging
|
||||
lg = "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit";
|
||||
plog = "log --graph --pretty='format:%C(red)%d%C(reset) %C(yellow)%h%C(reset) %ar %C(green)%aN%C(reset) %s'";
|
||||
tlog = "log --stat --since='1 Day Ago' --graph --pretty=oneline --abbrev-commit --date=relative";
|
||||
rank = "shortlog -sn --no-merges";
|
||||
authors = "authors | sort | uniq -c | sort -n";
|
||||
ls = "log --graph --abbrev-commit --decorate --color=always --date=relative --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) - %C(dim red)%an%C(reset)%C(bold yellow)%d%C(reset)' --all";
|
||||
|
||||
# delete merged branches
|
||||
bdm = "!git branch --merged | grep -v '*' | xargs -n 1 git branch -d";
|
||||
undo = "!git reset HEAD~1 --mixed";
|
||||
blm = "blame -w -C -C -C";
|
||||
# delete merged branches
|
||||
bdm = "!git branch --merged | grep -v '*' | xargs -n 1 git branch -d";
|
||||
undo = "!git reset HEAD~1 --mixed";
|
||||
blm = "blame -w -C -C -C";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user