talks/working-without-workspace/code/git.nix

28 lines
517 B
Nix
Raw Normal View History

2023-04-06 13:07:08 +00:00
programs.git = {
enable = true;
userName = "Oliver Davies";
userEmail = "oliver@oliverdavies.uk";
aliases = {
aa = "add --all";
assume = "update-index --assume-unchanged";
assumed = "!git ls-files -v | grep '^[hsmrck?]' | cut -c 3-";
b = "branch";
# ...
};
extraConfig = {
branch = {
autosetupmerge = true;
autosetuprebase = "always";
};
checkout.defaultRemote = "origin";
color.ui = true;
commit = {
template = "~/.gitmessage";
};
core = {
editor = "nvim";
excludesFile = "~/.gitignore-global";
pager = "delta";
};