cleanup git aliases and switch to delta for diffs

This commit is contained in:
Salar Rahmanian 2024-11-09 21:15:31 -08:00
parent a5bbdd636c
commit 52ae41a79b
2 changed files with 24 additions and 14 deletions

View file

@ -4,9 +4,26 @@ let
gitConfig = {
core = {
editor = "nvim";
pager = "diff-so-fancy | less --tabs=4 -RFX";
pager = "delta";
};
delta = {
"line-numbers" = true;
"hyperlinks" = true;
"side-by-side" = true;
};
diff = {
colorMoved = "default";
tool = "nvim";
};
difftool.nvim = {
cmd = "nvim -d \"$LOCAL\" \"$REMOTE\"";
prompt = false;
};
fetch.prune = true;
init.defaultBranch = "main";
interactive = {
diffFilter = "delta --color-only";
};
merge.conflictstyle = "diff3";
merge.tool = "nvim";
mergetool.nvim = {
@ -14,26 +31,26 @@ let
prompt = false;
keepBackup = false;
};
diff.tool = "nvim";
difftool.nvim = {
cmd = "nvim -d \"$LOCAL\" \"$REMOTE\"";
prompt = false;
};
# url = {
# "git@github.com:" = {
# insteadOf = "https://github.com/";
# };
# };
fetch.prune = true;
pull = {
rebase = true;
};
};
myAliases = {
ci = "commit";
cim = "commit -m";
cia = "commit -am";
co = "checkout";
cob = "checkout -b";
di = "diff";
gpo = "push origin";
main = "checkout main";
master = "checkout master";
st = "status";
};
myIgnores = [
"*~"