diff --git a/config/git/config b/config/git/config index 34e0623..708f5d4 100644 --- a/config/git/config +++ b/config/git/config @@ -1,18 +1,19 @@ +# vim: ft=gitconfig ai noexpandtab [include] - path = ~/.dotfiles/config/git/shared + path = ~/.dotfiles/config/git/shared [user] - name = Ismo Vuorinen - email = ismo@ivuorinen.net + name = Ismo Vuorinen + email = ismo@ivuorinen.net [github] - user = ivuorinen + user = ivuorinen [include] - path = ~/.config/git/overrides/config + path = ~/.config/git/overrides/config [advice] - detachedHead = false + detachedHead = false [column] ui = auto [branch] diff --git a/config/git/shared b/config/git/shared index 5a8cfb3..baf5ccd 100644 --- a/config/git/shared +++ b/config/git/shared @@ -1,53 +1,54 @@ +# vim: ft=gitconfig ai noexpandtab [credential] - helper = store --file ~/.cache/git/git-credentials - helper = cache --timeout 30000 + helper = store --file ~/.cache/git/git-credentials + helper = cache --timeout 30000 [core] - excludesfile = ~/.config/git/ignore + excludesfile = ~/.config/git/ignore [init] - defaultBranch = main + defaultBranch = main [pull] - rebase = true + rebase = true [alias] - branchbydate = for-each-ref --count=30 --sort=-committerdate refs/heads/ --format='%(refname:short)' - branchcolor = "!for ref in $(git for-each-ref --sort=-committerdate --format=\"%(refname)\" refs/heads/ refs/remotes ); do git log -n1 $ref --pretty=format:\"%Cgreen%cr%Creset %C(yellow)%d%Creset %C(bold blue)<%an>%Creset%n\" | cat ; done | awk '! a[$0]++'" - llog = log --pretty=fuller - logs = log --graph --pretty=format:'%C(magenta)%h%Creset -%C(red)%d%Creset %s %C(dim green)(%cr) %C(cyan)<%an>%Creset' --abbrev-commit - nah = !git reset --hard && git clean -df - recent = "!r() { count=$1; git for-each-ref --sort=-committerdate refs/heads --format='%(HEAD)%(color:yellow)%(refname:short)|%(color:bold green)%(committerdate:relative)|%(color:blue)%(subject)|%(color:magenta)%(authorname)%(color:reset)' --color=always --count=${count:=10} | column -ts'|';}; r" - reset-origin = !git fetch origin && git reset --hard origin/master && git clean -f -d - reset-upstream = !git fetch upstream && git reset --hard upstream/master && git clean -f -d - rl = reflog --format='%C(auto)%h %<|(20)%gd %C(blue)%cr%C(reset) %gs (%s)' - tagdate = log --date-order --graph --tags --simplify-by-decoration --pretty=format:\"%ai %h %d\" - undo = reset --soft HEAD^ - undo-commit = reset HEAD~ --soft + branchbydate = for-each-ref --count=30 --sort=-committerdate refs/heads/ --format='%(refname:short)' + branchcolor = "!for ref in $(git for-each-ref --sort=-committerdate --format=\"%(refname)\" refs/heads/ refs/remotes ); do git log -n1 $ref --pretty=format:\"%Cgreen%cr%Creset %C(yellow)%d%Creset %C(bold blue)<%an>%Creset%n\" | cat ; done | awk '! a[$0]++'" + llog = log --pretty=fuller + logs = log --graph --pretty=format:'%C(magenta)%h%Creset -%C(red)%d%Creset %s %C(dim green)(%cr) %C(cyan)<%an>%Creset' --abbrev-commit + nah = !git reset --hard && git clean -df + recent = "!r() { count=$1; git for-each-ref --sort=-committerdate refs/heads --format='%(HEAD)%(color:yellow)%(refname:short)|%(color:bold green)%(committerdate:relative)|%(color:blue)%(subject)|%(color:magenta)%(authorname)%(color:reset)' --color=always --count=${count:=10} | column -ts'|';}; r" + reset-origin = !git fetch origin && git reset --hard origin/master && git clean -f -d + reset-upstream = !git fetch upstream && git reset --hard upstream/master && git clean -f -d + rl = reflog --format='%C(auto)%h %<|(20)%gd %C(blue)%cr%C(reset) %gs (%s)' + tagdate = log --date-order --graph --tags --simplify-by-decoration --pretty=format:\"%ai %h %d\" + undo = reset --soft HEAD^ + undo-commit = reset HEAD~ --soft [filter "lfs"] - clean = git-lfs clean -- %f - smudge = git-lfs smudge -- %f - process = git-lfs filter-process - required = true + clean = git-lfs clean -- %f + smudge = git-lfs smudge -- %f + process = git-lfs filter-process + required = true [color] - ui = true - diff = auto - branch = auto - status = auto + ui = true + diff = auto + branch = auto + status = auto [color "status"] - added = green bold - changed = yellow - deleted = red bold strike - untracked = cyan - branch = yellow black bold ul + added = green bold + changed = yellow + deleted = red bold strike + untracked = cyan + branch = yellow black bold ul [submodule] - recurse = true + recurse = true # dotfiles special config [includeIf "hasconfig:remote.*.url:https://github.com/ivuorinen/dotfiles.git"] - path = ~/.dotfiles/config/git/special/dotfiles ; + path = ~/.dotfiles/config/git/special/dotfiles ; diff --git a/config/git/special/dotfiles b/config/git/special/dotfiles index dc24bfc..80bb4f5 100644 --- a/config/git/special/dotfiles +++ b/config/git/special/dotfiles @@ -1,2 +1,3 @@ +# vim: ft=gitconfig ai noexpandtab [submodule] - recurse = false + recurse = false diff --git a/hosts/s/config/git/local.d/work-git b/hosts/s/config/git/local.d/work-git index 8b1b58f..d92ee21 100644 --- a/hosts/s/config/git/local.d/work-git +++ b/hosts/s/config/git/local.d/work-git @@ -1,2 +1,4 @@ +# vim: ft=gitconfig ai noexpandtab + Host tfs.ia.corp.svea.com - IdentityFile ~/.ssh/id_rsa + IdentityFile ~/.ssh/id_rsa diff --git a/hosts/s/config/git/overrides/config b/hosts/s/config/git/overrides/config index 796bf59..65dac51 100644 --- a/hosts/s/config/git/overrides/config +++ b/hosts/s/config/git/overrides/config @@ -1,26 +1,26 @@ -# vim: ft=gitconfig sw=2 ts=2 et +# vim: ft=gitconfig ai noexpandtab [include] - path = ~/.dotfiles/config/git/shared + path = ~/.dotfiles/config/git/shared [gpg] - format = ssh + format = ssh [user] - name = Ismo Vuorinen - email = ismo.vuorinen@svea.com - signingkey = ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMmEaS/pitd8TzLNaXf0ojTydEyFp2TWoDctuqTEF8Aw + name = Ismo Vuorinen + email = ismo.vuorinen@svea.com + signingkey = ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMmEaS/pitd8TzLNaXf0ojTydEyFp2TWoDctuqTEF8Aw [gpg "ssh"] - program = /Applications/1Password.app/Contents/MacOS/op-ssh-sign - allowedSignersFile = ~/.ssh/allowed_signers + program = /Applications/1Password.app/Contents/MacOS/op-ssh-sign + allowedSignersFile = ~/.ssh/allowed_signers [commit] - gpgsign = true + gpgsign = true [credential "https://github.com"] - helper = - helper = !/opt/homebrew/bin/gh auth git-credential + helper = + helper = !/opt/homebrew/bin/gh auth git-credential [credential "https://gist.github.com"] - helper = - helper = !/opt/homebrew/bin/gh auth git-credential + helper = + helper = !/opt/homebrew/bin/gh auth git-credential