mirror of
https://github.com/anotherhadi/nixy.git
synced 2026-04-04 03:52:10 +02:00
update git config
Signed-off-by: Hadi <112569860+anotherhadi@users.noreply.github.com>
This commit is contained in:
@@ -5,8 +5,6 @@
|
|||||||
in {
|
in {
|
||||||
programs.git = {
|
programs.git = {
|
||||||
enable = true;
|
enable = true;
|
||||||
userName = username;
|
|
||||||
userEmail = email;
|
|
||||||
ignores = [
|
ignores = [
|
||||||
".cache/"
|
".cache/"
|
||||||
".DS_Store"
|
".DS_Store"
|
||||||
@@ -19,37 +17,39 @@ in {
|
|||||||
"result"
|
"result"
|
||||||
"result-*"
|
"result-*"
|
||||||
];
|
];
|
||||||
extraConfig = {
|
settings = {
|
||||||
|
user.name = username;
|
||||||
|
user.email = email;
|
||||||
init.defaultBranch = "main";
|
init.defaultBranch = "main";
|
||||||
pull.rebase = "false";
|
pull.rebase = "false";
|
||||||
push.autoSetupRemote = true;
|
push.autoSetupRemote = true;
|
||||||
color.ui = "1";
|
color.ui = "1";
|
||||||
};
|
alias = {
|
||||||
aliases = {
|
essa = "push --force";
|
||||||
essa = "push --force";
|
co = "checkout";
|
||||||
co = "checkout";
|
fuck = "commit --amend -m";
|
||||||
fuck = "commit --amend -m";
|
c = "commit -m";
|
||||||
c = "commit -m";
|
ca = "commit -am";
|
||||||
ca = "commit -am";
|
forgor = "commit --amend --no-edit";
|
||||||
forgor = "commit --amend --no-edit";
|
graph = "log --all --decorate --graph --oneline";
|
||||||
graph = "log --all --decorate --graph --oneline";
|
oops = "checkout --";
|
||||||
oops = "checkout --";
|
l = "log";
|
||||||
l = "log";
|
r = "rebase";
|
||||||
r = "rebase";
|
s = "status --short";
|
||||||
s = "status --short";
|
ss = "status";
|
||||||
ss = "status";
|
d = "diff";
|
||||||
d = "diff";
|
ps = "!git push origin $(git rev-parse --abbrev-ref HEAD)";
|
||||||
ps = "!git push origin $(git rev-parse --abbrev-ref HEAD)";
|
pl = "!git pull origin $(git rev-parse --abbrev-ref HEAD)";
|
||||||
pl = "!git pull origin $(git rev-parse --abbrev-ref HEAD)";
|
af = "!git add $(git ls-files -m -o --exclude-standard | sk -m)";
|
||||||
af = "!git add $(git ls-files -m -o --exclude-standard | sk -m)";
|
st = "status";
|
||||||
st = "status";
|
br = "branch";
|
||||||
br = "branch";
|
df = "!git hist | peco | awk '{print $2}' | xargs -I {} git diff {}^ {}";
|
||||||
df = "!git hist | peco | awk '{print $2}' | xargs -I {} git diff {}^ {}";
|
hist = ''
|
||||||
hist = ''
|
log --pretty=format:"%Cgreen%h %Creset%cd %Cblue[%cn] %Creset%s%C(yellow)%d%C(reset)" --graph --date=relative --decorate --all'';
|
||||||
log --pretty=format:"%Cgreen%h %Creset%cd %Cblue[%cn] %Creset%s%C(yellow)%d%C(reset)" --graph --date=relative --decorate --all'';
|
llog = ''
|
||||||
llog = ''
|
log --graph --name-status --pretty=format:"%C(red)%h %C(reset)(%cd) %C(green)%an %Creset%s %C(yellow)%d%Creset" --date=relative'';
|
||||||
log --graph --name-status --pretty=format:"%C(red)%h %C(reset)(%cd) %C(green)%an %Creset%s %C(yellow)%d%Creset" --date=relative'';
|
edit-unmerged = "!f() { git ls-files --unmerged | cut -f2 | sort -u ; }; hx `f`";
|
||||||
edit-unmerged = "!f() { git ls-files --unmerged | cut -f2 | sort -u ; }; hx `f`";
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
# Obviously, change this to your own SSH key.
|
# Obviously, change this to your own SSH key.
|
||||||
home.file.".ssh/allowed_signers".text = "* ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIINhWby7lUUXQNKbRu9/UOrGjWDf3fvoAwGHomWv/+lL";
|
home.file.".ssh/allowed_signers".text = "* ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIINhWby7lUUXQNKbRu9/UOrGjWDf3fvoAwGHomWv/+lL";
|
||||||
|
|
||||||
programs.git.extraConfig = {
|
programs.git.settings = {
|
||||||
commit.gpgsign = true;
|
commit.gpgsign = true;
|
||||||
gpg.ssh.allowedSignersFile = "~/.ssh/allowed_signers";
|
gpg.ssh.allowedSignersFile = "~/.ssh/allowed_signers";
|
||||||
gpg.format = "ssh";
|
gpg.format = "ssh";
|
||||||
|
|||||||
Reference in New Issue
Block a user