mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-07-10 06:32:42 +02:00
fix: programs.git - renamed options
This commit is contained in:
+51
-49
@@ -40,18 +40,27 @@
|
|||||||
enable = true;
|
enable = true;
|
||||||
lfs.enable = true;
|
lfs.enable = true;
|
||||||
|
|
||||||
userName = myvars.userfullname;
|
# signing = {
|
||||||
userEmail = myvars.useremail;
|
# key = "xxx";
|
||||||
|
# signByDefault = true;
|
||||||
|
# };
|
||||||
|
|
||||||
includes = [
|
includes = [
|
||||||
{
|
{
|
||||||
# use different email & name for work
|
# use different email & name for work:
|
||||||
|
#
|
||||||
|
# [user]
|
||||||
|
# email = "xxx@xxx.com"
|
||||||
|
# name = "Ryan Yin"
|
||||||
path = "~/work/.gitconfig";
|
path = "~/work/.gitconfig";
|
||||||
condition = "gitdir:~/work/";
|
condition = "gitdir:~/work/";
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
extraConfig = {
|
settings = {
|
||||||
|
user.email = myvars.useremail;
|
||||||
|
user.name = myvars.userfullname;
|
||||||
|
|
||||||
init.defaultBranch = "main";
|
init.defaultBranch = "main";
|
||||||
trim.bases = "develop,master,main"; # for git-trim
|
trim.bases = "develop,master,main"; # for git-trim
|
||||||
push.autoSetupRemote = true;
|
push.autoSetupRemote = true;
|
||||||
@@ -63,58 +72,51 @@
|
|||||||
"ssh://git@github.com/ryan4yin" = {
|
"ssh://git@github.com/ryan4yin" = {
|
||||||
insteadOf = "https://github.com/ryan4yin";
|
insteadOf = "https://github.com/ryan4yin";
|
||||||
};
|
};
|
||||||
# "ssh://git@gitlab.com/" = {
|
# "ssh://git@bitbucket.com/ryan4yin" = {
|
||||||
# insteadOf = "https://gitlab.com/";
|
# insteadOf = "https://bitbucket.com/ryan4yin";
|
||||||
# };
|
|
||||||
# "ssh://git@bitbucket.com/" = {
|
|
||||||
# insteadOf = "https://bitbucket.com/";
|
|
||||||
# };
|
# };
|
||||||
};
|
};
|
||||||
};
|
|
||||||
|
|
||||||
# signing = {
|
aliases = {
|
||||||
# key = "xxx";
|
# common aliases
|
||||||
# signByDefault = true;
|
br = "branch";
|
||||||
# };
|
co = "checkout";
|
||||||
|
st = "status";
|
||||||
|
ls = "log --pretty=format:\"%C(yellow)%h%Cred%d\\\\ %Creset%s%Cblue\\\\ [%cn]\" --decorate";
|
||||||
|
ll = "log --pretty=format:\"%C(yellow)%h%Cred%d\\\\ %Creset%s%Cblue\\\\ [%cn]\" --decorate --numstat";
|
||||||
|
cm = "commit -m"; # commit via `git cm <message>`
|
||||||
|
ca = "commit -am"; # commit all changes via `git ca <message>`
|
||||||
|
dc = "diff --cached";
|
||||||
|
|
||||||
# A syntax-highlighting pager for git, diff, grep, and blame output
|
amend = "commit --amend -m"; # amend commit message via `git amend <message>`
|
||||||
delta = {
|
unstage = "reset HEAD --"; # unstage file via `git unstage <file>`
|
||||||
enable = true;
|
merged = "branch --merged"; # list merged(into HEAD) branches via `git merged`
|
||||||
options = {
|
unmerged = "branch --no-merged"; # list unmerged(into HEAD) branches via `git unmerged`
|
||||||
diff-so-fancy = true;
|
nonexist = "remote prune origin --dry-run"; # list non-exist(remote) branches via `git nonexist`
|
||||||
line-numbers = true;
|
|
||||||
true-color = "always";
|
# delete merged branches except master & dev & staging
|
||||||
# features => named groups of settings, used to keep related settings organized
|
# `!` indicates it's a shell script, not a git subcommand
|
||||||
# features = "";
|
delmerged = ''! git branch --merged | egrep -v "(^\*|main|master|dev|staging)" | xargs git branch -d'';
|
||||||
|
# delete non-exist(remote) branches
|
||||||
|
delnonexist = "remote prune origin";
|
||||||
|
|
||||||
|
# aliases for submodule
|
||||||
|
update = "submodule update --init --recursive";
|
||||||
|
foreach = "submodule foreach";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
};
|
||||||
|
|
||||||
aliases = {
|
# A syntax-highlighting pager for git, diff, grep, and blame output
|
||||||
# common aliases
|
programs.delta = {
|
||||||
br = "branch";
|
enable = true;
|
||||||
co = "checkout";
|
enableGitIntegration = true;
|
||||||
st = "status";
|
options = {
|
||||||
ls = "log --pretty=format:\"%C(yellow)%h%Cred%d\\\\ %Creset%s%Cblue\\\\ [%cn]\" --decorate";
|
diff-so-fancy = true;
|
||||||
ll = "log --pretty=format:\"%C(yellow)%h%Cred%d\\\\ %Creset%s%Cblue\\\\ [%cn]\" --decorate --numstat";
|
line-numbers = true;
|
||||||
cm = "commit -m"; # commit via `git cm <message>`
|
true-color = "always";
|
||||||
ca = "commit -am"; # commit all changes via `git ca <message>`
|
# features => named groups of settings, used to keep related settings organized
|
||||||
dc = "diff --cached";
|
# features = "";
|
||||||
|
|
||||||
amend = "commit --amend -m"; # amend commit message via `git amend <message>`
|
|
||||||
unstage = "reset HEAD --"; # unstage file via `git unstage <file>`
|
|
||||||
merged = "branch --merged"; # list merged(into HEAD) branches via `git merged`
|
|
||||||
unmerged = "branch --no-merged"; # list unmerged(into HEAD) branches via `git unmerged`
|
|
||||||
nonexist = "remote prune origin --dry-run"; # list non-exist(remote) branches via `git nonexist`
|
|
||||||
|
|
||||||
# delete merged branches except master & dev & staging
|
|
||||||
# `!` indicates it's a shell script, not a git subcommand
|
|
||||||
delmerged = ''! git branch --merged | egrep -v "(^\*|main|master|dev|staging)" | xargs git branch -d'';
|
|
||||||
# delete non-exist(remote) branches
|
|
||||||
delnonexist = "remote prune origin";
|
|
||||||
|
|
||||||
# aliases for submodule
|
|
||||||
update = "submodule update --init --recursive";
|
|
||||||
foreach = "submodule foreach";
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user