2023-03-03 23:33:37 +01:00
|
|
|
{ pkgs, ... }:
|
|
|
|
{
|
2023-03-12 05:14:28 +01:00
|
|
|
home.packages = with pkgs; [
|
|
|
|
git
|
|
|
|
gh
|
|
|
|
hub
|
2024-01-26 01:46:33 +01:00
|
|
|
colordiff
|
2023-03-12 05:14:28 +01:00
|
|
|
];
|
2023-03-04 00:09:57 +01:00
|
|
|
|
2023-03-03 23:33:37 +01:00
|
|
|
#programs.git.gitui.enable = true;
|
|
|
|
programs.git.enable = true;
|
|
|
|
programs.git.delta.enable = true;
|
|
|
|
#programs.git.lfs.enable = true;
|
|
|
|
#programs.git.signing
|
|
|
|
#programs.git.userName = "pbsds"
|
|
|
|
programs.git.userName = "Peder Bergebakken Sundt";
|
|
|
|
programs.git.userEmail = "pbsds@hotmail.com";
|
2024-02-17 17:08:51 +01:00
|
|
|
|
|
|
|
# https://jvns.ca/blog/2024/02/16/popular-git-config-options/
|
|
|
|
programs.git.extraConfig.rerere.enabled = true;
|
|
|
|
programs.git.extraConfig.help.autocorrect = "prompt";
|
|
|
|
programs.git.extraConfig.transfer.fsckobjects = true;
|
|
|
|
programs.git.extraConfig.fetch.fsckobjects = true;
|
|
|
|
programs.git.extraConfig.receive.fsckObjects = true;
|
|
|
|
programs.git.extraConfig.branch.sort = "-committerdate";
|
|
|
|
programs.git.extraConfig.tag.sort = "taggerdate";
|
|
|
|
programs.git.extraConfig.fetch.prune = true;
|
|
|
|
programs.git.extraConfig.fetch.prunetags = true;
|
|
|
|
programs.git.extraConfig.log.date = "iso";
|
|
|
|
|
|
|
|
|
2023-03-03 23:33:37 +01:00
|
|
|
programs.git.ignores = [
|
|
|
|
"result"
|
|
|
|
"result-info"
|
|
|
|
"result-doc"
|
|
|
|
"result-man"
|
|
|
|
"result-dev"
|
|
|
|
"result-lib"
|
|
|
|
"__pycache__"
|
2023-03-12 05:14:28 +01:00
|
|
|
"*.pyc"
|
2023-03-03 23:33:37 +01:00
|
|
|
];
|
2023-06-14 12:24:53 +02:00
|
|
|
programs.git.iniContent.init.defaultBranch = "main";
|
2023-03-03 23:33:37 +01:00
|
|
|
|
|
|
|
home.shellAliases = {
|
|
|
|
# git gud
|
2023-03-12 05:14:28 +01:00
|
|
|
gs = "git status";
|
|
|
|
gb = "git blame";
|
|
|
|
gl = "git log --oneline --color | head -n 30";
|
|
|
|
glg = "git log --all --decorate --oneline --graph";
|
|
|
|
gpra = "git pull --rebase --autostash";
|
|
|
|
gd = "git diff";
|
|
|
|
gdwd = "git diff --word-diff";
|
|
|
|
gdwdr = "git diff --word-diff --word-diff-regex=.";
|
|
|
|
gds = "git diff --staged";
|
|
|
|
gdswd = "git diff --staged --word-diff";
|
2023-03-03 23:33:37 +01:00
|
|
|
gdswdr = "git diff --staged --word-diff --word-diff-regex=.";
|
2023-03-12 05:14:28 +01:00
|
|
|
gcp = "git cherry-pick";
|
|
|
|
gca = "git commit --amend";
|
|
|
|
gcara = "git commit --amend --reset-author";
|
|
|
|
gpo = "git push origin";
|
|
|
|
gpasr = "git pull --autostash --rebase";
|
|
|
|
#gfr = "git fetch origin master && git rebase FETCH_HEAD";
|
|
|
|
gfr = "git pull --rebase";
|
|
|
|
gp = "git pull --rebase --autostash";
|
2023-03-03 23:33:37 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|