fix git deprecate issue

This commit is contained in:
Yan Lin 2025-10-23 19:04:22 +02:00
parent f29862b9e3
commit 255c2739a3

View file

@ -7,98 +7,71 @@
}; };
programs.git = { programs.git = {
enable = true; enable = true;
userName = "Yan Lin";
userEmail = "github@yanlincs.com";
ignores = [ ignores = [
# Claude Code # Claude Code
"**/.claude/settings.local.json" "**/.claude/settings.local.json"
# macOS # macOS
".DS_Store" ".DS_Store"
# Editors # Editors
".vscode/" ".vscode/"
".idea/" ".idea/"
# Development # Development
"node_modules/" "node_modules/"
".env" ".env"
".env.local" ".env.local"
".env.*.local" ".env.*.local"
]; ];
extraConfig = { settings = {
user = {
name = "Yan Lin";
email = "github@yanlincs.com";
};
# Platform-specific credential configuration # Platform-specific credential configuration
credential = { credential = {
# OAuth platforms (handled by git-credential-oauth) # OAuth platforms (handled by git-credential-oauth)
"https://github.com".helper = "oauth"; "https://github.com".helper = "oauth";
"https://gitlab.com".helper = "oauth"; "https://gitlab.com".helper = "oauth";
"https://bitbucket.org".helper = "oauth"; "https://bitbucket.org".helper = "oauth";
# Token-based platforms # Token-based platforms
"https://git.overleaf.com".helper = "store"; "https://git.overleaf.com".helper = "store";
"https://git.overleaf.com".username = "git"; "https://git.overleaf.com".username = "git";
}; };
core = { core = {
editor = "nvim"; editor = "nvim";
autocrlf = "input"; autocrlf = "input";
ignorecase = false; ignorecase = false;
}; };
init.defaultBranch = "main"; init.defaultBranch = "main";
push = { push = {
default = "simple"; default = "simple";
autoSetupRemote = true; autoSetupRemote = true;
}; };
pull = { pull = {
rebase = true; rebase = true;
}; };
merge = { merge = {
conflictstyle = "diff3"; conflictstyle = "diff3";
}; };
diff = { diff = {
colorMoved = "default"; colorMoved = "default";
}; };
status = { status = {
showUntrackedFiles = "all"; showUntrackedFiles = "all";
}; };
}; };
aliases = {
st = "status";
co = "checkout";
br = "branch";
ci = "commit";
unstage = "reset HEAD --";
last = "log -1 HEAD";
visual = "!gitk";
# Better logging
lg = "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit";
lga = "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --all";
# Quick operations
up = "pull --rebase";
cm = "commit -m";
ca = "commit --amend";
# Show changes
d = "diff";
dc = "diff --cached";
ds = "diff --stat";
# Stash operations
sl = "stash list";
sp = "stash pop";
ss = "stash save";
};
}; };
} }