update git config

This commit is contained in:
2025-10-23 00:33:04 +02:00
parent add12d2958
commit 789879c6eb
4 changed files with 20 additions and 30 deletions

View File

@@ -5,29 +5,19 @@ in
{
programs.git = {
enable = true;
userName = "${gitUsername}";
userEmail = "${gitEmail}";
settings = {
# FOSS-friendly settings
push.default = "simple"; # Match modern push behavior
user = {
name = "${gitUsername}";
email = "${gitEmail}";
};
push.default = "simple";
credential.helper = "cache --timeout=7200";
init.defaultBranch = "main"; # Set default new branches to 'main'
log.decorate = "full"; # Show branch/tag info in git log
log.date = "iso"; # ISO 8601 date format
# Conflict resolution style for readable diffs
init.defaultBranch = "main";
log = {
decorate = "full";
date = "iso";
};
merge.conflictStyle = "diff3";
};
# Optional: FOSS-friendly Git aliases
aliases = {
br = "branch --sort=-committerdate";
co = "checkout";
df = "diff";
com = "commit -a";
gs = "stash";
gp = "pull";
lg = "log --graph --pretty=format:'%Cred%h%Creset - %C(yellow)%d%Creset %s %C(green)(%cr)%C(bold blue) <%an>%Creset' --abbrev-commit";
st = "status";
};
};
}