From ab41f3ffc005e0a8d6e37153354946fa1c7b14ca Mon Sep 17 00:00:00 2001 From: NaeiKinDus Date: Wed, 26 Feb 2025 00:00:00 +0000 Subject: [PATCH] chore(common): updated gitconfig --- .../roles/common/templates/home/.gitconfig.j2 | 46 ++++++++++++------- 1 file changed, 29 insertions(+), 17 deletions(-) diff --git a/ansible_collections/nullified/infrastructure/roles/common/templates/home/.gitconfig.j2 b/ansible_collections/nullified/infrastructure/roles/common/templates/home/.gitconfig.j2 index c3a9179..465f324 100644 --- a/ansible_collections/nullified/infrastructure/roles/common/templates/home/.gitconfig.j2 +++ b/ansible_collections/nullified/infrastructure/roles/common/templates/home/.gitconfig.j2 @@ -1,31 +1,45 @@ [user] name = {{ common_git_username }} email = {{ common_git_email }} - {%- if common_git_force_sign and common_git_signing_key +%} +{%- if common_git_force_sign and common_git_signing_key +%} signingkey = {{ common_git_signing_key }} - {%- endif +%} +{%- endif +%} [commit] - {% if common_git_force_sign -%} +{% if common_git_force_sign -%} gpgsign = true - {%- else -%} +{%- else -%} gpgsign = false - {%- endif +%} +{%- endif +%} +[push] + autoSetupRemote = true + default = simple + followTags = true +{% if common_git_force_sign -%} + gpgsign = true +{%- else -%} + gpgsign = false +{%- endif +%} +[merge] + conflictstyle = diff3 +[pull] + rebase = true [tag] - {% if common_git_force_sign -%} +{% if common_git_force_sign -%} gpgsign = true - {%- else -%} +{%- else -%} gpgsign = false - {%- endif +%} +{%- endif +%} {%- raw %} [alias] br = "branch" ci = "commit" - cmp = "!f() { git log --graph --color --boundary --oneline HEAD...origin/$1; }; f" + cmp = "!f() { git log --graph --color --boundary --oneline HEAD...$1; }; f" + dcmp = "!f() { git log --graph --color --boundary --oneline HEAD...origin/$1; }; f" co = "checkout" cp = "cherry-pick" cpo = "cherry-pick --strategy=recursive -Xours --allow-empty" cpt = "cherry-pick --strategy=recursive -Xtheirs --allow-empty" - dm = "log --graph --color --boundary --oneline HEAD...origin/master" + dm = "log --graph --color --boundary --oneline HEAD...origin/main" dup = "!git log --graph --color --boundary --oneline HEAD...origin/$(git rev-parse --abbrev-ref HEAD)" psuo = "!git push --set-upstream origin $(git rev-parse --abbrev-ref HEAD)" rf = "!git reflog --date=iso" @@ -44,9 +58,13 @@ lg2-specific = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(auto)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)' lg3-specific = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset) %C(bold cyan)(committed: %cD)%C(reset) %C(auto)%d%C(reset)%n'' %C(white)%s%C(reset)%n'' %C(dim white)- %an <%ae> %C(reset) %C(dim white)(committer: %cn <%ce>)%C(reset)' [core] - editor = emacs + abbrev = auto autocrlf = input + editor = emacs pager = delta +[rerere] + autoUpdate = true + enabled = true [color] status = auto branch = auto @@ -57,12 +75,6 @@ [delta] navigate = true line-numbers = true -[push] - default = simple -[merge] - conflictstyle = diff3 -[pull] - rebase = true [diff] colorMoved = default [diff "pdf"]