modules/git: Better global config
https://blog.gitbutler.com/how-git-core-devs-configure-git/
This commit is contained in:
parent
b19fb51e6e
commit
de79669ca6
1 changed files with 48 additions and 13 deletions
|
@ -1,4 +1,5 @@
|
||||||
{pkgs, ...}:{
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
programs.git = {
|
programs.git = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.gitSVN;
|
package = pkgs.gitSVN;
|
||||||
|
@ -17,6 +18,27 @@
|
||||||
signByDefault = true;
|
signByDefault = true;
|
||||||
};
|
};
|
||||||
extraConfig = {
|
extraConfig = {
|
||||||
|
"branch" = {
|
||||||
|
sort = "-commiterdate";
|
||||||
|
};
|
||||||
|
"column" = {
|
||||||
|
ui = "auto";
|
||||||
|
};
|
||||||
|
"commit" = {
|
||||||
|
verbose = "true";
|
||||||
|
};
|
||||||
|
"diff" = {
|
||||||
|
algorithm = "histogram";
|
||||||
|
colorMoved = "plain";
|
||||||
|
mnemonicPrefix = "true";
|
||||||
|
renames = "true";
|
||||||
|
};
|
||||||
|
"tag" = {
|
||||||
|
sort = "version:refname";
|
||||||
|
};
|
||||||
|
"help" = {
|
||||||
|
autocorrect = "promt";
|
||||||
|
};
|
||||||
"core" = {
|
"core" = {
|
||||||
pager = "less -F -X";
|
pager = "less -F -X";
|
||||||
};
|
};
|
||||||
|
@ -26,29 +48,42 @@
|
||||||
"pull" = {
|
"pull" = {
|
||||||
rebase = "true";
|
rebase = "true";
|
||||||
};
|
};
|
||||||
|
"rebase" = {
|
||||||
|
autoSquash = "true";
|
||||||
|
autoStash = "true";
|
||||||
|
updateRefs = "true";
|
||||||
|
};
|
||||||
|
"fetch" = {
|
||||||
|
all = "true";
|
||||||
|
prune = "true";
|
||||||
|
pruneTags = "true";
|
||||||
|
};
|
||||||
"push" = {
|
"push" = {
|
||||||
autoSetupRemote = "true";
|
autoSetupRemote = "true";
|
||||||
|
default = "simple";
|
||||||
|
followTags = "true";
|
||||||
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
aliases = {
|
aliases = {
|
||||||
# checkout-pull-request from GitHub
|
# checkout-pull-request from GitHub
|
||||||
cpr = "!f() { git fetch origin refs/pull/$1/head && git checkout FETCH_HEAD; }; f";
|
cpr = "!f() { git fetch origin refs/pull/$1/head && git checkout FETCH_HEAD; }; f";
|
||||||
};
|
};
|
||||||
|
|
||||||
includes = [{
|
includes = [
|
||||||
condition = "gitdir:~/denic/";
|
{
|
||||||
contents = {
|
condition = "gitdir:~/denic/";
|
||||||
user = {
|
contents = {
|
||||||
email = "breidenstein@denic.de";
|
user = {
|
||||||
name = "Felix Breidenstein";
|
email = "breidenstein@denic.de";
|
||||||
|
name = "Felix Breidenstein";
|
||||||
|
};
|
||||||
|
commit = {
|
||||||
|
gpgSign = false;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
commit = {
|
}
|
||||||
gpgSign = false;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue